summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-11 14:31:01 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:49:29 +0100
commit68dc2dc526e146dd0ac68d5d68eb55b601282caf (patch)
tree3cb17dbc091b56cd4293a7d9d095d71c93234094 /source4/librpc
parent78a4f5eadad447cd92f27a5fe4311eceea12f1f9 (diff)
downloadsamba-68dc2dc526e146dd0ac68d5d68eb55b601282caf.tar.gz
samba-68dc2dc526e146dd0ac68d5d68eb55b601282caf.tar.bz2
samba-68dc2dc526e146dd0ac68d5d68eb55b601282caf.zip
r26399: Use -O option for SWIG (less evil generated code).
(This used to be commit 3378b6a559272cb702b52966692bf423f67a2b41)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/rpc/dcerpc.py59
-rw-r--r--source4/librpc/rpc/dcerpc_wrap.c26
2 files changed, 53 insertions, 32 deletions
diff --git a/source4/librpc/rpc/dcerpc.py b/source4/librpc/rpc/dcerpc.py
index b2edb17f33..da3664d80e 100644
--- a/source4/librpc/rpc/dcerpc.py
+++ b/source4/librpc/rpc/dcerpc.py
@@ -2,7 +2,6 @@
# Version 1.3.33
#
# Don't modify this file, modify the SWIG interface instead.
-# This file is compatible with both classic and new-style classes.
import _dcerpc
import new
@@ -48,36 +47,40 @@ except AttributeError:
del types
-class Credentials(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, Credentials, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, Credentials, name)
+def _swig_setattr_nondynamic_method(set):
+ def set_attr(self,name,value):
+ if (name == "thisown"): return self.this.own(value)
+ if hasattr(self,name) or (name == "this"):
+ set(self,name,value)
+ else:
+ raise AttributeError("You cannot add attributes to %s" % self)
+ return set_attr
+
+
+class Credentials(object):
+ thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args, **kwargs):
- this = _dcerpc.new_Credentials(*args, **kwargs)
- try: self.this.append(this)
- except: self.this = this
+ _dcerpc.Credentials_swiginit(self,_dcerpc.new_Credentials(*args, **kwargs))
__swig_destroy__ = _dcerpc.delete_Credentials
- __del__ = lambda self : None;
- def get_username(*args, **kwargs): return _dcerpc.Credentials_get_username(*args, **kwargs)
- def set_username(*args, **kwargs): return _dcerpc.Credentials_set_username(*args, **kwargs)
- def get_password(*args, **kwargs): return _dcerpc.Credentials_get_password(*args, **kwargs)
- def set_password(*args, **kwargs): return _dcerpc.Credentials_set_password(*args, **kwargs)
- def get_domain(*args, **kwargs): return _dcerpc.Credentials_get_domain(*args, **kwargs)
- def set_domain(*args, **kwargs): return _dcerpc.Credentials_set_domain(*args, **kwargs)
- def get_realm(*args, **kwargs): return _dcerpc.Credentials_get_realm(*args, **kwargs)
- def set_realm(*args, **kwargs): return _dcerpc.Credentials_set_realm(*args, **kwargs)
- def parse_string(*args, **kwargs): return _dcerpc.Credentials_parse_string(*args, **kwargs)
- def get_bind_dn(*args, **kwargs): return _dcerpc.Credentials_get_bind_dn(*args, **kwargs)
- def set_bind_dn(*args, **kwargs): return _dcerpc.Credentials_set_bind_dn(*args, **kwargs)
- def get_workstation(*args, **kwargs): return _dcerpc.Credentials_get_workstation(*args, **kwargs)
- def set_workstation(*args, **kwargs): return _dcerpc.Credentials_set_workstation(*args, **kwargs)
- def guess(*args, **kwargs): return _dcerpc.Credentials_guess(*args, **kwargs)
- def is_anonymous(*args, **kwargs): return _dcerpc.Credentials_is_anonymous(*args, **kwargs)
- def get_nt_hash(*args, **kwargs): return _dcerpc.Credentials_get_nt_hash(*args, **kwargs)
- def authentication_requested(*args, **kwargs): return _dcerpc.Credentials_authentication_requested(*args, **kwargs)
- def wrong_password(*args, **kwargs): return _dcerpc.Credentials_wrong_password(*args, **kwargs)
+Credentials.get_username = new_instancemethod(_dcerpc.Credentials_get_username,None,Credentials)
+Credentials.set_username = new_instancemethod(_dcerpc.Credentials_set_username,None,Credentials)
+Credentials.get_password = new_instancemethod(_dcerpc.Credentials_get_password,None,Credentials)
+Credentials.set_password = new_instancemethod(_dcerpc.Credentials_set_password,None,Credentials)
+Credentials.get_domain = new_instancemethod(_dcerpc.Credentials_get_domain,None,Credentials)
+Credentials.set_domain = new_instancemethod(_dcerpc.Credentials_set_domain,None,Credentials)
+Credentials.get_realm = new_instancemethod(_dcerpc.Credentials_get_realm,None,Credentials)
+Credentials.set_realm = new_instancemethod(_dcerpc.Credentials_set_realm,None,Credentials)
+Credentials.parse_string = new_instancemethod(_dcerpc.Credentials_parse_string,None,Credentials)
+Credentials.get_bind_dn = new_instancemethod(_dcerpc.Credentials_get_bind_dn,None,Credentials)
+Credentials.set_bind_dn = new_instancemethod(_dcerpc.Credentials_set_bind_dn,None,Credentials)
+Credentials.get_workstation = new_instancemethod(_dcerpc.Credentials_get_workstation,None,Credentials)
+Credentials.set_workstation = new_instancemethod(_dcerpc.Credentials_set_workstation,None,Credentials)
+Credentials.guess = new_instancemethod(_dcerpc.Credentials_guess,None,Credentials)
+Credentials.is_anonymous = new_instancemethod(_dcerpc.Credentials_is_anonymous,None,Credentials)
+Credentials.get_nt_hash = new_instancemethod(_dcerpc.Credentials_get_nt_hash,None,Credentials)
+Credentials.authentication_requested = new_instancemethod(_dcerpc.Credentials_authentication_requested,None,Credentials)
+Credentials.wrong_password = new_instancemethod(_dcerpc.Credentials_wrong_password,None,Credentials)
Credentials_swigregister = _dcerpc.Credentials_swigregister
Credentials_swigregister(Credentials)
diff --git a/source4/librpc/rpc/dcerpc_wrap.c b/source4/librpc/rpc/dcerpc_wrap.c
index c9eb72fb9e..c60fef9e9d 100644
--- a/source4/librpc/rpc/dcerpc_wrap.c
+++ b/source4/librpc/rpc/dcerpc_wrap.c
@@ -9,7 +9,7 @@
* ----------------------------------------------------------------------------- */
#define SWIGPYTHON
-#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
+#define SWIG_PYTHON_NO_BUILD_NONE
/* -----------------------------------------------------------------------------
* This section contains generic SWIG labels for method/variable
* declarations/attributes, and other compiler dependent labels.
@@ -2476,6 +2476,19 @@ static swig_module_info swig_module = {swig_types, 8, 0, 0, 0, 0};
# error "This python version requires swig to be run with the '-classic' option"
# endif
#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodern' option"
+#endif
+#if (PY_VERSION_HEX <= 0x02020000)
+# error "This python version requires swig to be run with the '-nomodernargs' option"
+#endif
+#ifndef METH_O
+# error "This python version requires swig to be run with the '-nofastunpack' option"
+#endif
+#ifdef SWIG_TypeQuery
+# undef SWIG_TypeQuery
+#endif
+#define SWIG_TypeQuery SWIG_Python_TypeQuery
/*-----------------------------------------------
@(target):= _dcerpc.so
@@ -2775,7 +2788,7 @@ SWIGINTERN PyObject *_wrap_new_Credentials(PyObject *SWIGUNUSEDPARM(self), PyObj
PyObject *resultobj = 0;
cli_credentials *result = 0 ;
- if (!PyArg_ParseTuple(args,(char *)":new_Credentials")) SWIG_fail;
+ if (!SWIG_Python_UnpackTuple(args,"new_Credentials",0,0,0)) SWIG_fail;
result = (cli_credentials *)new_cli_credentials();
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_cli_credentials, SWIG_POINTER_NEW | 0 );
return resultobj;
@@ -3535,11 +3548,15 @@ fail:
SWIGINTERN PyObject *Credentials_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
- if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+ if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_cli_credentials, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
+SWIGINTERN PyObject *Credentials_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ return SWIG_Python_InitShadowInstance(args);
+}
+
SWIGINTERN PyObject *_wrap_pipe_connect(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
TALLOC_CTX *arg1 = (TALLOC_CTX *) 0 ;
@@ -3665,7 +3682,7 @@ fail:
static PyMethodDef SwigMethods[] = {
- { (char *)"new_Credentials", _wrap_new_Credentials, METH_VARARGS, NULL},
+ { (char *)"new_Credentials", (PyCFunction)_wrap_new_Credentials, METH_NOARGS, NULL},
{ (char *)"delete_Credentials", (PyCFunction) _wrap_delete_Credentials, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_get_username", (PyCFunction) _wrap_Credentials_get_username, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_set_username", (PyCFunction) _wrap_Credentials_set_username, METH_VARARGS | METH_KEYWORDS, NULL},
@@ -3686,6 +3703,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"Credentials_authentication_requested", (PyCFunction) _wrap_Credentials_authentication_requested, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_wrong_password", (PyCFunction) _wrap_Credentials_wrong_password, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_swigregister", Credentials_swigregister, METH_VARARGS, NULL},
+ { (char *)"Credentials_swiginit", Credentials_swiginit, METH_VARARGS, NULL},
{ (char *)"pipe_connect", (PyCFunction) _wrap_pipe_connect, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"dcerpc_server_name", (PyCFunction) _wrap_dcerpc_server_name, METH_VARARGS | METH_KEYWORDS, NULL},
{ NULL, NULL, 0, NULL }