diff options
-rw-r--r-- | source4/scripting/swig/dcerpc.i | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/scripting/swig/dcerpc.i b/source4/scripting/swig/dcerpc.i index 10c20d201f..9d5e9f295d 100644 --- a/source4/scripting/swig/dcerpc.i +++ b/source4/scripting/swig/dcerpc.i @@ -134,11 +134,17 @@ struct security_descriptor *security_descriptor_from_python(PyObject *obj) char *string_from_python(PyObject *obj) { + if (obj == Py_None) + return NULL; + return PyString_AsString(obj); } PyObject *string_to_python(char *obj) { + if (obj == NULL) + return Py_None; + return PyString_FromString(obj); } |