mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Set path for plugins
This commit is contained in:
parent
5cb28822eb
commit
ece153cd08
@ -48,6 +48,7 @@ api_init(void)
|
|||||||
PyObject *pName, *pModule, *pProfInit, *pProfOnStart, *pArgs;
|
PyObject *pName, *pModule, *pProfInit, *pProfOnStart, *pArgs;
|
||||||
|
|
||||||
Py_Initialize();
|
Py_Initialize();
|
||||||
|
PySys_SetPath("$PYTHONPATH:./plugins/");
|
||||||
Py_InitModule("prof", apiMethods);
|
Py_InitModule("prof", apiMethods);
|
||||||
pName = PyString_FromString("helloworld");
|
pName = PyString_FromString("helloworld");
|
||||||
pModule = PyImport_Import(pName);
|
pModule = PyImport_Import(pName);
|
||||||
@ -58,7 +59,7 @@ api_init(void)
|
|||||||
if (pProfInit && PyCallable_Check(pProfInit)) {
|
if (pProfInit && PyCallable_Check(pProfInit)) {
|
||||||
pArgs = Py_BuildValue("ss", PACKAGE_VERSION, PACKAGE_STATUS);
|
pArgs = Py_BuildValue("ss", PACKAGE_VERSION, PACKAGE_STATUS);
|
||||||
PyObject_CallObject(pProfInit, pArgs);
|
PyObject_CallObject(pProfInit, pArgs);
|
||||||
// Py_XDECREF(pArgs);
|
Py_XDECREF(pArgs);
|
||||||
}
|
}
|
||||||
Py_XDECREF(pProfInit);
|
Py_XDECREF(pProfInit);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user