tsocket: Fixed documentation for tsocket_address_bsd_sockaddr().
[ira/wip.git] / lib / tdb / pytdb.c
index 15a8d8a3e212c0995bf6acc194c4c7e875e23854..202dca1571e495496de2944e6c829e5b07b9b112 100644 (file)
@@ -1,7 +1,7 @@
 /* 
    Unix SMB/CIFS implementation.
 
 /* 
    Unix SMB/CIFS implementation.
 
-   Swig interface to tdb.
+   Python interface to tdb.
 
    Copyright (C) 2004-2006 Tim Potter <tpot@samba.org>
    Copyright (C) 2007-2008 Jelmer Vernooij <jelmer@samba.org>
 
    Copyright (C) 2004-2006 Tim Potter <tpot@samba.org>
    Copyright (C) 2007-2008 Jelmer Vernooij <jelmer@samba.org>
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "replace.h"
+#include "system/filesys.h"
+
 #include <Python.h>
 #ifndef Py_RETURN_NONE
 #define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
 #endif
 
 #include <Python.h>
 #ifndef Py_RETURN_NONE
 #define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
 #endif
 
-#ifdef HAVE_FSTAT
-#undef HAVE_FSTAT
-#endif
-
 /* Include tdb headers */
 /* Include tdb headers */
-#include <stdint.h>
-#include <signal.h>
 #include <tdb.h>
 #include <tdb.h>
-#include <fcntl.h>
-#include <stdbool.h>
 
 typedef struct {
        PyObject_HEAD
 
 typedef struct {
        PyObject_HEAD
@@ -342,7 +337,7 @@ static PyMethodDef tdb_object_methods[] = {
        { "read_lock_all", (PyCFunction)obj_lockall_read, METH_NOARGS, NULL },
        { "read_unlock_all", (PyCFunction)obj_unlockall_read, METH_NOARGS, NULL },
        { "close", (PyCFunction)obj_close, METH_NOARGS, NULL },
        { "read_lock_all", (PyCFunction)obj_lockall_read, METH_NOARGS, NULL },
        { "read_unlock_all", (PyCFunction)obj_unlockall_read, METH_NOARGS, NULL },
        { "close", (PyCFunction)obj_close, METH_NOARGS, NULL },
-       { "get", (PyCFunction)obj_get, METH_VARARGS, "S.fetch(key) -> value\n"
+       { "get", (PyCFunction)obj_get, METH_VARARGS, "S.get(key) -> value\n"
                "Fetch a value." },
        { "append", (PyCFunction)obj_append, METH_VARARGS, "S.append(key, value) -> None\n"
                "Append data to an existing key." },
                "Fetch a value." },
        { "append", (PyCFunction)obj_append, METH_VARARGS, "S.append(key, value) -> None\n"
                "Append data to an existing key." },