diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-11 14:31:01 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:49:29 +0100 |
commit | 68dc2dc526e146dd0ac68d5d68eb55b601282caf (patch) | |
tree | 3cb17dbc091b56cd4293a7d9d095d71c93234094 /source4/lib/tdb | |
parent | 78a4f5eadad447cd92f27a5fe4311eceea12f1f9 (diff) | |
download | samba-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/lib/tdb')
-rw-r--r-- | source4/lib/tdb/tdb.py | 67 | ||||
-rw-r--r-- | source4/lib/tdb/tdb_wrap.c | 179 |
2 files changed, 141 insertions, 105 deletions
diff --git a/source4/lib/tdb/tdb.py b/source4/lib/tdb/tdb.py index 1105291099..d4cf9f5c6f 100644 --- a/source4/lib/tdb/tdb.py +++ b/source4/lib/tdb/tdb.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 _tdb import new @@ -48,6 +47,16 @@ except AttributeError: del types +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 + + REPLACE = _tdb.REPLACE INSERT = _tdb.INSERT MODIFY = _tdb.MODIFY @@ -69,39 +78,11 @@ TDB_ERR_LOCK_TIMEOUT = _tdb.TDB_ERR_LOCK_TIMEOUT TDB_ERR_NOEXIST = _tdb.TDB_ERR_NOEXIST TDB_ERR_EINVAL = _tdb.TDB_ERR_EINVAL TDB_ERR_RDONLY = _tdb.TDB_ERR_RDONLY -class tdb(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, tdb, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, tdb, name) +class tdb(object): + thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self): raise AttributeError, "No constructor defined" __repr__ = _swig_repr - def error(*args, **kwargs): return _tdb.tdb_error(*args, **kwargs) __swig_destroy__ = _tdb.delete_tdb - __del__ = lambda self : None; - def close(*args, **kwargs): return _tdb.tdb_close(*args, **kwargs) - def append(*args, **kwargs): return _tdb.tdb_append(*args, **kwargs) - def errorstr(*args, **kwargs): return _tdb.tdb_errorstr(*args, **kwargs) - def fetch(*args, **kwargs): return _tdb.tdb_fetch(*args, **kwargs) - def delete(*args, **kwargs): return _tdb.tdb_delete(*args, **kwargs) - def store(*args, **kwargs): return _tdb.tdb_store(*args, **kwargs) - def exists(*args, **kwargs): return _tdb.tdb_exists(*args, **kwargs) - def firstkey(*args, **kwargs): return _tdb.tdb_firstkey(*args, **kwargs) - def nextkey(*args, **kwargs): return _tdb.tdb_nextkey(*args, **kwargs) - def lock_all(*args, **kwargs): return _tdb.tdb_lock_all(*args, **kwargs) - def unlock_all(*args, **kwargs): return _tdb.tdb_unlock_all(*args, **kwargs) - def read_lock_all(*args, **kwargs): return _tdb.tdb_read_lock_all(*args, **kwargs) - def read_unlock_all(*args, **kwargs): return _tdb.tdb_read_unlock_all(*args, **kwargs) - def reopen(*args, **kwargs): return _tdb.tdb_reopen(*args, **kwargs) - def transaction_start(*args, **kwargs): return _tdb.tdb_transaction_start(*args, **kwargs) - def transaction_commit(*args, **kwargs): return _tdb.tdb_transaction_commit(*args, **kwargs) - def transaction_cancel(*args, **kwargs): return _tdb.tdb_transaction_cancel(*args, **kwargs) - def transaction_recover(*args, **kwargs): return _tdb.tdb_transaction_recover(*args, **kwargs) - def hash_size(*args, **kwargs): return _tdb.tdb_hash_size(*args, **kwargs) - def map_size(*args, **kwargs): return _tdb.tdb_map_size(*args, **kwargs) - def get_flags(*args, **kwargs): return _tdb.tdb_get_flags(*args, **kwargs) - def set_max_dead(*args, **kwargs): return _tdb.tdb_set_max_dead(*args, **kwargs) - def name(*args, **kwargs): return _tdb.tdb_name(*args, **kwargs) def __str__(self): return self.name() @@ -173,6 +154,30 @@ class tdb(_object): +tdb.error = new_instancemethod(_tdb.tdb_error,None,tdb) +tdb.close = new_instancemethod(_tdb.tdb_close,None,tdb) +tdb.append = new_instancemethod(_tdb.tdb_append,None,tdb) +tdb.errorstr = new_instancemethod(_tdb.tdb_errorstr,None,tdb) +tdb.fetch = new_instancemethod(_tdb.tdb_fetch,None,tdb) +tdb.delete = new_instancemethod(_tdb.tdb_delete,None,tdb) +tdb.store = new_instancemethod(_tdb.tdb_store,None,tdb) +tdb.exists = new_instancemethod(_tdb.tdb_exists,None,tdb) +tdb.firstkey = new_instancemethod(_tdb.tdb_firstkey,None,tdb) +tdb.nextkey = new_instancemethod(_tdb.tdb_nextkey,None,tdb) +tdb.lock_all = new_instancemethod(_tdb.tdb_lock_all,None,tdb) +tdb.unlock_all = new_instancemethod(_tdb.tdb_unlock_all,None,tdb) +tdb.read_lock_all = new_instancemethod(_tdb.tdb_read_lock_all,None,tdb) +tdb.read_unlock_all = new_instancemethod(_tdb.tdb_read_unlock_all,None,tdb) +tdb.reopen = new_instancemethod(_tdb.tdb_reopen,None,tdb) +tdb.transaction_start = new_instancemethod(_tdb.tdb_transaction_start,None,tdb) +tdb.transaction_commit = new_instancemethod(_tdb.tdb_transaction_commit,None,tdb) +tdb.transaction_cancel = new_instancemethod(_tdb.tdb_transaction_cancel,None,tdb) +tdb.transaction_recover = new_instancemethod(_tdb.tdb_transaction_recover,None,tdb) +tdb.hash_size = new_instancemethod(_tdb.tdb_hash_size,None,tdb) +tdb.map_size = new_instancemethod(_tdb.tdb_map_size,None,tdb) +tdb.get_flags = new_instancemethod(_tdb.tdb_get_flags,None,tdb) +tdb.set_max_dead = new_instancemethod(_tdb.tdb_set_max_dead,None,tdb) +tdb.name = new_instancemethod(_tdb.tdb_name,None,tdb) tdb_swigregister = _tdb.tdb_swigregister tdb_swigregister(tdb) diff --git a/source4/lib/tdb/tdb_wrap.c b/source4/lib/tdb/tdb_wrap.c index b9660c3428..841cd78399 100644 --- a/source4/lib/tdb/tdb_wrap.c +++ b/source4/lib/tdb/tdb_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. @@ -2479,6 +2479,19 @@ static swig_module_info swig_module = {swig_types, 11, 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):= _tdb.so @@ -2880,10 +2893,11 @@ SWIGINTERN PyObject *_wrap_tdb_error(PyObject *SWIGUNUSEDPARM(self), PyObject *a enum TDB_ERROR result; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:tdb_error",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_error" "', argument " "1"" of type '" "tdb *""'"); } @@ -2901,10 +2915,11 @@ SWIGINTERN PyObject *_wrap_delete_tdb(PyObject *SWIGUNUSEDPARM(self), PyObject * tdb *arg1 = (tdb *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:delete_tdb",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, SWIG_POINTER_DISOWN | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_tdb" "', argument " "1"" of type '" "tdb *""'"); } @@ -2924,10 +2939,11 @@ SWIGINTERN PyObject *_wrap_tdb_close(PyObject *SWIGUNUSEDPARM(self), PyObject *a int result; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:tdb_close",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_close" "', argument " "1"" of type '" "tdb *""'"); } @@ -2991,10 +3007,11 @@ SWIGINTERN PyObject *_wrap_tdb_errorstr(PyObject *SWIGUNUSEDPARM(self), PyObject char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:tdb_errorstr",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_errorstr" "', argument " "1"" of type '" "tdb *""'"); } @@ -3184,10 +3201,11 @@ SWIGINTERN PyObject *_wrap_tdb_firstkey(PyObject *SWIGUNUSEDPARM(self), PyObject TDB_DATA result; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:tdb_firstkey",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_firstkey" "', argument " "1"" of type '" "tdb *""'"); } @@ -3255,10 +3273,11 @@ SWIGINTERN PyObject *_wrap_tdb_lock_all(PyObject *SWIGUNUSEDPARM(self), PyObject int result; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:tdb_lock_all",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_lock_all" "', argument " "1"" of type '" "tdb *""'"); } @@ -3277,10 +3296,11 @@ SWIGINTERN PyObject *_wrap_tdb_unlock_all(PyObject *SWIGUNUSEDPARM(self), PyObje int result; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:tdb_unlock_all",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_unlock_all" "', argument " "1"" of type '" "tdb *""'"); } @@ -3299,10 +3319,11 @@ SWIGINTERN PyObject *_wrap_tdb_read_lock_all(PyObject *SWIGUNUSEDPARM(self), PyO int result; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:tdb_read_lock_all",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_read_lock_all" "', argument " "1"" of type '" "tdb *""'"); } @@ -3321,10 +3342,11 @@ SWIGINTERN PyObject *_wrap_tdb_read_unlock_all(PyObject *SWIGUNUSEDPARM(self), P int result; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:tdb_read_unlock_all",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_read_unlock_all" "', argument " "1"" of type '" "tdb *""'"); } @@ -3343,10 +3365,11 @@ SWIGINTERN PyObject *_wrap_tdb_reopen(PyObject *SWIGUNUSEDPARM(self), PyObject * int result; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:tdb_reopen",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_reopen" "', argument " "1"" of type '" "tdb *""'"); } @@ -3365,10 +3388,11 @@ SWIGINTERN PyObject *_wrap_tdb_transaction_start(PyObject *SWIGUNUSEDPARM(self), int result; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:tdb_transaction_start",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_transaction_start" "', argument " "1"" of type '" "tdb *""'"); } @@ -3387,10 +3411,11 @@ SWIGINTERN PyObject *_wrap_tdb_transaction_commit(PyObject *SWIGUNUSEDPARM(self) int result; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:tdb_transaction_commit",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_transaction_commit" "', argument " "1"" of type '" "tdb *""'"); } @@ -3409,10 +3434,11 @@ SWIGINTERN PyObject *_wrap_tdb_transaction_cancel(PyObject *SWIGUNUSEDPARM(self) int result; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:tdb_transaction_cancel",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_transaction_cancel" "', argument " "1"" of type '" "tdb *""'"); } @@ -3431,10 +3457,11 @@ SWIGINTERN PyObject *_wrap_tdb_transaction_recover(PyObject *SWIGUNUSEDPARM(self int result; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:tdb_transaction_recover",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_transaction_recover" "', argument " "1"" of type '" "tdb *""'"); } @@ -3453,10 +3480,11 @@ SWIGINTERN PyObject *_wrap_tdb_hash_size(PyObject *SWIGUNUSEDPARM(self), PyObjec int result; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:tdb_hash_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_hash_size" "', argument " "1"" of type '" "tdb *""'"); } @@ -3475,10 +3503,11 @@ SWIGINTERN PyObject *_wrap_tdb_map_size(PyObject *SWIGUNUSEDPARM(self), PyObject size_t result; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:tdb_map_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_map_size" "', argument " "1"" of type '" "tdb *""'"); } @@ -3497,10 +3526,11 @@ SWIGINTERN PyObject *_wrap_tdb_get_flags(PyObject *SWIGUNUSEDPARM(self), PyObjec int result; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:tdb_get_flags",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_get_flags" "', argument " "1"" of type '" "tdb *""'"); } @@ -3552,10 +3582,11 @@ SWIGINTERN PyObject *_wrap_tdb_name(PyObject *SWIGUNUSEDPARM(self), PyObject *ar char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - PyObject * obj0 = 0 ; + PyObject *swig_obj[1] ; - if (!PyArg_ParseTuple(args,(char *)"O:tdb_name",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tdb_name" "', argument " "1"" of type '" "tdb *""'"); } @@ -3570,38 +3601,38 @@ fail: SWIGINTERN PyObject *tdb_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_tdb_context, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } static PyMethodDef SwigMethods[] = { { (char *)"new_Tdb", (PyCFunction) _wrap_new_Tdb, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"tdb_error", _wrap_tdb_error, METH_VARARGS, NULL}, - { (char *)"delete_tdb", _wrap_delete_tdb, METH_VARARGS, NULL}, - { (char *)"tdb_close", _wrap_tdb_close, METH_VARARGS, NULL}, + { (char *)"tdb_error", (PyCFunction)_wrap_tdb_error, METH_O, NULL}, + { (char *)"delete_tdb", (PyCFunction)_wrap_delete_tdb, METH_O, NULL}, + { (char *)"tdb_close", (PyCFunction)_wrap_tdb_close, METH_O, NULL}, { (char *)"tdb_append", (PyCFunction) _wrap_tdb_append, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"tdb_errorstr", _wrap_tdb_errorstr, METH_VARARGS, NULL}, + { (char *)"tdb_errorstr", (PyCFunction)_wrap_tdb_errorstr, METH_O, NULL}, { (char *)"tdb_fetch", (PyCFunction) _wrap_tdb_fetch, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"tdb_delete", (PyCFunction) _wrap_tdb_delete, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"tdb_store", (PyCFunction) _wrap_tdb_store, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"tdb_exists", (PyCFunction) _wrap_tdb_exists, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"tdb_firstkey", _wrap_tdb_firstkey, METH_VARARGS, NULL}, + { (char *)"tdb_firstkey", (PyCFunction)_wrap_tdb_firstkey, METH_O, NULL}, { (char *)"tdb_nextkey", (PyCFunction) _wrap_tdb_nextkey, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"tdb_lock_all", _wrap_tdb_lock_all, METH_VARARGS, NULL}, - { (char *)"tdb_unlock_all", _wrap_tdb_unlock_all, METH_VARARGS, NULL}, - { (char *)"tdb_read_lock_all", _wrap_tdb_read_lock_all, METH_VARARGS, NULL}, - { (char *)"tdb_read_unlock_all", _wrap_tdb_read_unlock_all, METH_VARARGS, NULL}, - { (char *)"tdb_reopen", _wrap_tdb_reopen, METH_VARARGS, NULL}, - { (char *)"tdb_transaction_start", _wrap_tdb_transaction_start, METH_VARARGS, NULL}, - { (char *)"tdb_transaction_commit", _wrap_tdb_transaction_commit, METH_VARARGS, NULL}, - { (char *)"tdb_transaction_cancel", _wrap_tdb_transaction_cancel, METH_VARARGS, NULL}, - { (char *)"tdb_transaction_recover", _wrap_tdb_transaction_recover, METH_VARARGS, NULL}, - { (char *)"tdb_hash_size", _wrap_tdb_hash_size, METH_VARARGS, NULL}, - { (char *)"tdb_map_size", _wrap_tdb_map_size, METH_VARARGS, NULL}, - { (char *)"tdb_get_flags", _wrap_tdb_get_flags, METH_VARARGS, NULL}, + { (char *)"tdb_lock_all", (PyCFunction)_wrap_tdb_lock_all, METH_O, NULL}, + { (char *)"tdb_unlock_all", (PyCFunction)_wrap_tdb_unlock_all, METH_O, NULL}, + { (char *)"tdb_read_lock_all", (PyCFunction)_wrap_tdb_read_lock_all, METH_O, NULL}, + { (char *)"tdb_read_unlock_all", (PyCFunction)_wrap_tdb_read_unlock_all, METH_O, NULL}, + { (char *)"tdb_reopen", (PyCFunction)_wrap_tdb_reopen, METH_O, NULL}, + { (char *)"tdb_transaction_start", (PyCFunction)_wrap_tdb_transaction_start, METH_O, NULL}, + { (char *)"tdb_transaction_commit", (PyCFunction)_wrap_tdb_transaction_commit, METH_O, NULL}, + { (char *)"tdb_transaction_cancel", (PyCFunction)_wrap_tdb_transaction_cancel, METH_O, NULL}, + { (char *)"tdb_transaction_recover", (PyCFunction)_wrap_tdb_transaction_recover, METH_O, NULL}, + { (char *)"tdb_hash_size", (PyCFunction)_wrap_tdb_hash_size, METH_O, NULL}, + { (char *)"tdb_map_size", (PyCFunction)_wrap_tdb_map_size, METH_O, NULL}, + { (char *)"tdb_get_flags", (PyCFunction)_wrap_tdb_get_flags, METH_O, NULL}, { (char *)"tdb_set_max_dead", (PyCFunction) _wrap_tdb_set_max_dead, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"tdb_name", _wrap_tdb_name, METH_VARARGS, NULL}, + { (char *)"tdb_name", (PyCFunction)_wrap_tdb_name, METH_O, NULL}, { (char *)"tdb_swigregister", tdb_swigregister, METH_VARARGS, NULL}, { NULL, NULL, 0, NULL } }; |