diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-23 19:19:41 -0600 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-24 01:51:03 -0600 |
commit | aa0a06f13c44e0eca0b3f2f0c34f0f7995b87159 (patch) | |
tree | 92c180a6928f94f64934e2fab842768c134fed63 /source4/libcli/security | |
parent | 784c22899f211fa42728e784c2f2e6e5701ddcac (diff) | |
download | samba-aa0a06f13c44e0eca0b3f2f0c34f0f7995b87159.tar.gz samba-aa0a06f13c44e0eca0b3f2f0c34f0f7995b87159.tar.bz2 samba-aa0a06f13c44e0eca0b3f2f0c34f0f7995b87159.zip |
r26570: - Trim size of the swig-generated Python bindings by removing a bunch of {}'s.
- Start working on Python equivalents for various EJS tests.
- Fix regression in argument order for reg_diff_apply() in EJS bindings.
(This used to be commit c550c03372cb260b78f6a6c132e70571bc4cb852)
Diffstat (limited to 'source4/libcli/security')
-rw-r--r-- | source4/libcli/security/security_wrap.c | 72 |
1 files changed, 29 insertions, 43 deletions
diff --git a/source4/libcli/security/security_wrap.c b/source4/libcli/security/security_wrap.c index 9c572425eb..58bfd19bec 100644 --- a/source4/libcli/security/security_wrap.c +++ b/source4/libcli/security/security_wrap.c @@ -2802,9 +2802,7 @@ SWIGINTERN PyObject *_wrap_new_SecurityToken(PyObject *SWIGUNUSEDPARM(self), PyO TALLOC_CTX *arg1 = (TALLOC_CTX *) 0 ; security_token *result = 0 ; - { - arg1 = NULL; - } + arg1 = NULL; if (!SWIG_Python_UnpackTuple(args,"new_SecurityToken",0,0,0)) SWIG_fail; result = (security_token *)new_security_token(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_security_token, SWIG_POINTER_NEW | 0 ); @@ -3080,9 +3078,7 @@ SWIGINTERN PyObject *_wrap_new_security_descriptor(PyObject *SWIGUNUSEDPARM(self TALLOC_CTX *arg1 = (TALLOC_CTX *) 0 ; security_descriptor *result = 0 ; - { - arg1 = NULL; - } + arg1 = NULL; if (!SWIG_Python_UnpackTuple(args,"new_security_descriptor",0,0,0)) SWIG_fail; result = (security_descriptor *)new_security_descriptor(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_security_descriptor, SWIG_POINTER_NEW | 0 ); @@ -3119,13 +3115,12 @@ SWIGINTERN PyObject *_wrap_security_descriptor_sacl_add(PyObject *SWIGUNUSEDPARM } arg2 = (struct security_ace *)(argp2); result = security_descriptor_sacl_add(arg1,(struct security_ace const *)arg2); - { - if (NT_STATUS_IS_ERR(result)) { - PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, nt_errstr(result)); - PyErr_SetObject(PyExc_RuntimeError, obj); - } else if (resultobj == NULL) { - resultobj = Py_None; - } + if (NT_STATUS_IS_ERR(result)) { + PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, nt_errstr(result)); + PyErr_SetObject(PyExc_RuntimeError, obj); + SWIG_fail; + } else if (resultobj == NULL) { + resultobj = Py_None; } return resultobj; fail: @@ -3160,13 +3155,12 @@ SWIGINTERN PyObject *_wrap_security_descriptor_dacl_add(PyObject *SWIGUNUSEDPARM } arg2 = (struct security_ace *)(argp2); result = security_descriptor_dacl_add(arg1,(struct security_ace const *)arg2); - { - if (NT_STATUS_IS_ERR(result)) { - PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, nt_errstr(result)); - PyErr_SetObject(PyExc_RuntimeError, obj); - } else if (resultobj == NULL) { - resultobj = Py_None; - } + if (NT_STATUS_IS_ERR(result)) { + PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, nt_errstr(result)); + PyErr_SetObject(PyExc_RuntimeError, obj); + SWIG_fail; + } else if (resultobj == NULL) { + resultobj = Py_None; } return resultobj; fail: @@ -3201,13 +3195,12 @@ SWIGINTERN PyObject *_wrap_security_descriptor_dacl_del(PyObject *SWIGUNUSEDPARM } arg2 = (struct security_ace *)(argp2); result = security_descriptor_dacl_del(arg1,(struct security_ace const *)arg2); - { - if (NT_STATUS_IS_ERR(result)) { - PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, nt_errstr(result)); - PyErr_SetObject(PyExc_RuntimeError, obj); - } else if (resultobj == NULL) { - resultobj = Py_None; - } + if (NT_STATUS_IS_ERR(result)) { + PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, nt_errstr(result)); + PyErr_SetObject(PyExc_RuntimeError, obj); + SWIG_fail; + } else if (resultobj == NULL) { + resultobj = Py_None; } return resultobj; fail: @@ -3242,13 +3235,12 @@ SWIGINTERN PyObject *_wrap_security_descriptor_sacl_del(PyObject *SWIGUNUSEDPARM } arg2 = (struct security_ace *)(argp2); result = security_descriptor_sacl_del(arg1,(struct security_ace const *)arg2); - { - if (NT_STATUS_IS_ERR(result)) { - PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, nt_errstr(result)); - PyErr_SetObject(PyExc_RuntimeError, obj); - } else if (resultobj == NULL) { - resultobj = Py_None; - } + if (NT_STATUS_IS_ERR(result)) { + PyObject *obj = Py_BuildValue("(i,s)", (&result)->v, nt_errstr(result)); + PyErr_SetObject(PyExc_RuntimeError, obj); + SWIG_fail; + } else if (resultobj == NULL) { + resultobj = Py_None; } return resultobj; fail: @@ -3337,9 +3329,7 @@ SWIGINTERN PyObject *_wrap_new_Sid(PyObject *SWIGUNUSEDPARM(self), PyObject *arg (char *) "text", NULL }; - { - arg1 = NULL; - } + arg1 = NULL; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_Sid",kwnames,&obj0)) SWIG_fail; res2 = SWIG_AsCharPtrAndSize(obj0, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { @@ -3365,9 +3355,7 @@ SWIGINTERN PyObject *_wrap_Sid___str__(PyObject *SWIGUNUSEDPARM(self), PyObject int res1 = 0 ; PyObject *swig_obj[1] ; - { - arg2 = NULL; - } + arg2 = NULL; if (!args) SWIG_fail; swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_dom_sid, 0 | 0 ); @@ -3456,9 +3444,7 @@ SWIGINTERN PyObject *_wrap_random_sid(PyObject *SWIGUNUSEDPARM(self), PyObject * TALLOC_CTX *arg1 = (TALLOC_CTX *) 0 ; struct dom_sid *result = 0 ; - { - arg1 = NULL; - } + arg1 = NULL; if (!SWIG_Python_UnpackTuple(args,"random_sid",0,0,0)) SWIG_fail; result = (struct dom_sid *)random_sid(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_dom_sid, 0 | 0 ); |