diff options
Diffstat (limited to 'source4/librpc/rpc/pyrpc_util.c')
-rw-r--r-- | source4/librpc/rpc/pyrpc_util.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source4/librpc/rpc/pyrpc_util.c b/source4/librpc/rpc/pyrpc_util.c index cec8574319..314ad2cc8d 100644 --- a/source4/librpc/rpc/pyrpc_util.c +++ b/source4/librpc/rpc/pyrpc_util.c @@ -304,6 +304,28 @@ bool PyInterface_AddNdrRpcMethods(PyTypeObject *ifacetype, const struct PyNdrRpc return true; } +PyObject *py_dcerpc_syntax_init_helper(PyTypeObject *type, PyObject *args, PyObject *kwargs, + const struct ndr_syntax_id *syntax) +{ + PyObject *ret; + struct ndr_syntax_id *obj; + const char *kwnames[] = { NULL }; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":abstract_syntax", discard_const_p(char *, kwnames))) { + return NULL; + } + + ret = pytalloc_new(struct ndr_syntax_id, type); + if (ret == NULL) { + return NULL; + } + + obj = (struct ndr_syntax_id *)pytalloc_get_ptr(ret); + *obj = *syntax; + + return ret; +} + void PyErr_SetDCERPCStatus(struct dcerpc_pipe *p, NTSTATUS status) { if (p && NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) { |