comparison python/pydc/pydcext.c @ 32:2089026debae

- allowing 'None' as arg for pydc.load, effectively resulting in dlLoadLibrary(NULL), which is own process
author Tassilo Philipp
date Sat, 11 Apr 2020 18:02:33 +0200
parents 622914f1f3bf
children ba47a3d709d7
comparison
equal deleted inserted replaced
31:622914f1f3bf 32:2089026debae
72 pydc_load(PyObject* self, PyObject* args) 72 pydc_load(PyObject* self, PyObject* args)
73 { 73 {
74 const char* libpath; 74 const char* libpath;
75 void* libhandle; 75 void* libhandle;
76 76
77 if (!PyArg_ParseTuple(args,"s", &libpath)) 77 if (!PyArg_ParseTuple(args,"z", &libpath))
78 return PyErr_Format(PyExc_RuntimeError, "libpath argument (str) missing"); 78 return PyErr_Format(PyExc_RuntimeError, "libpath argument (str) missing");
79 79
80 libhandle = dlLoadLibrary(libpath); 80 libhandle = dlLoadLibrary(libpath);
81 81
82 if (!libhandle) 82 if (!libhandle)