diff options
Diffstat (limited to 'source4/librpc/rpc/pyrpc_util.c')
-rw-r--r-- | source4/librpc/rpc/pyrpc_util.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/librpc/rpc/pyrpc_util.c b/source4/librpc/rpc/pyrpc_util.c index 33bce387af..5ad8d2f9e8 100644 --- a/source4/librpc/rpc/pyrpc_util.c +++ b/source4/librpc/rpc/pyrpc_util.c @@ -300,3 +300,11 @@ PyObject *py_return_ndr_struct(const char *module_name, const char *type_name, return py_talloc_reference_ex(py_type, r_ctx, r); } + +PyObject *PyString_FromStringOrNULL(const char *str) +{ + if (str == NULL) { + Py_RETURN_NONE; + } + return PyString_FromString(str); +} |