[SCM] Samba Shared Repository - branch master updated -
61a23c5eea2203721a70a4ad41bfdc6cd1d6a2a7
Tim Prouty
tprouty at samba.org
Thu Jan 8 00:15:42 GMT 2009
The branch, master has been updated
via 61a23c5eea2203721a70a4ad41bfdc6cd1d6a2a7 (commit)
via bed05fbf2e73d4e637e9267c2205feae7ae6440e (commit)
from 9b44fb1c931e8e295794aa33394aa3ddd930f1fa (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 61a23c5eea2203721a70a4ad41bfdc6cd1d6a2a7
Author: Tim Prouty <tprouty at samba.org>
Date: Wed Jan 7 14:33:25 2009 -0800
s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4
commit bed05fbf2e73d4e637e9267c2205feae7ae6440e
Author: Tim Prouty <tprouty at samba.org>
Date: Wed Jan 7 13:12:35 2009 -0800
s3 merged build: Fix include error
On some builds compiling source4/ntvfs/common/brlock_tdb.c was failing
because tdb_wrap.h couldn't find tdb.h. Adding the path should fix
the problem.
-----------------------------------------------------------------------
Summary of changes:
lib/tdb/pytdb.c | 2 +-
lib/tevent/pytevent.c | 2 +-
source4/winbind/idmap.h => lib/util/python_util.h | 28 +++++++-------------
libcli/nbt/pynbt.c | 2 +-
pidl/lib/Parse/Pidl/Samba4/Python.pm | 2 +-
source4/auth/credentials/pycredentials.c | 1 +
source4/lib/com/pycom.c | 2 +-
source4/lib/ldb/pyldb.c | 1 +
source4/lib/messaging/pymessaging.c | 2 +-
source4/lib/registry/pyregistry.c | 2 +-
source4/lib/tdb_wrap.h | 2 +-
source4/librpc/ndr/py_security.c | 1 +
source4/librpc/rpc/pyrpc.c | 2 +-
source4/param/pyparam.c | 1 +
source4/scripting/python/pyglue.c | 2 +-
source4/web_server/wsgi.c | 2 +-
16 files changed, 25 insertions(+), 29 deletions(-)
copy source4/winbind/idmap.h => lib/util/python_util.h (63%)
Changeset truncated at 500 lines:
diff --git a/lib/tdb/pytdb.c b/lib/tdb/pytdb.c
index 88f6f4e..f2e0944 100644
--- a/lib/tdb/pytdb.c
+++ b/lib/tdb/pytdb.c
@@ -24,7 +24,7 @@
License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <Python.h>
+#include "../lib/util/python_util.h"
#ifdef HAVE_FSTAT
#undef HAVE_FSTAT
#endif
diff --git a/lib/tevent/pytevent.c b/lib/tevent/pytevent.c
index f8e6481..756d013 100644
--- a/lib/tevent/pytevent.c
+++ b/lib/tevent/pytevent.c
@@ -16,7 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <Python.h>
+#include "../lib/util/python_util.h"
#include <tevent.h>
#include <stdbool.h>
#include <tevent_util.h>
diff --git a/source4/winbind/idmap.h b/lib/util/python_util.h
similarity index 63%
copy from source4/winbind/idmap.h
copy to lib/util/python_util.h
index 7429466..24033a4 100644
--- a/source4/winbind/idmap.h
+++ b/lib/util/python_util.h
@@ -1,9 +1,7 @@
/*
Unix SMB/CIFS implementation.
-
- Map SIDs to uids/gids and back
-
- Copyright (C) Kai Blin 2008
+ Samba Python utility functions
+ Copyright (C) Tim Prouty <tprouty at samba.org> 2009
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,21 +17,15 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _IDMAP_H_
-#define _IDMAP_H_
-
-#include "librpc/gen_ndr/winbind.h"
-
-struct idmap_context {
- struct loadparm_context *lp_ctx;
- struct ldb_context *ldb_ctx;
- struct dom_sid *unix_groups_sid;
- struct dom_sid *unix_users_sid;
-};
-
-struct tevent_context;
+#ifndef _PYTHON_UTIL_H_
+#define _PYTHON_UTIL_H_
-#include "winbind/idmap_proto.h"
+#include <Python.h>
+#if PY_VERSION_HEX < 0x02040000
+#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
+#define Py_RETURN_TRUE return Py_INCREF(Py_True), Py_True
+#define Py_RETURN_FALSE return Py_INCREF(Py_False), Py_False
#endif
+#endif /* _PYTHON_UTIL_H_ */
diff --git a/libcli/nbt/pynbt.c b/libcli/nbt/pynbt.c
index 8a6d459..99eff94 100644
--- a/libcli/nbt/pynbt.c
+++ b/libcli/nbt/pynbt.c
@@ -18,7 +18,7 @@
*/
#include "includes.h"
-#include <Python.h>
+#include "../lib/util/python_util.h"
#include "libcli/util/pyerrors.h"
#include "scripting/python/modules.h"
#include "../libcli/nbt/libnbt.h"
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 938ea36..dd93605 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -1121,7 +1121,7 @@ sub Parse($$$$$)
$self->pidl_hdr("
/* Python wrapper functions auto-generated by pidl */
#include \"includes.h\"
-#include <Python.h>
+#include \"../lib/util/python_util.h\"
#include \"librpc/rpc/dcerpc.h\"
#include \"lib/talloc/pytalloc.h\"
#include \"librpc/rpc/pyrpc.h\"
diff --git a/source4/auth/credentials/pycredentials.c b/source4/auth/credentials/pycredentials.c
index 903ca2f..6821170 100644
--- a/source4/auth/credentials/pycredentials.c
+++ b/source4/auth/credentials/pycredentials.c
@@ -17,6 +17,7 @@
*/
#include "includes.h"
+#include "../lib/util/python_util.h"
#include "pycredentials.h"
#include "param/param.h"
#include "lib/cmdline/credentials.h"
diff --git a/source4/lib/com/pycom.c b/source4/lib/com/pycom.c
index 55f1fd2..753b7f8 100644
--- a/source4/lib/com/pycom.c
+++ b/source4/lib/com/pycom.c
@@ -18,7 +18,7 @@
*/
#include "includes.h"
-#include <Python.h>
+#include "../lib/util/python_util.h"
#include "lib/com/com.h"
#include "librpc/ndr/libndr.h"
#include "libcli/util/pyerrors.h"
diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
index 521fa49..b7a78e8 100644
--- a/source4/lib/ldb/pyldb.c
+++ b/source4/lib/ldb/pyldb.c
@@ -26,6 +26,7 @@
*/
#include "ldb_includes.h"
+#include "../lib/util/python_util.h"
#include "pyldb.h"
/* There's no Py_ssize_t in 2.4, apparently */
diff --git a/source4/lib/messaging/pymessaging.c b/source4/lib/messaging/pymessaging.c
index 4b092e8..3fa59bd 100644
--- a/source4/lib/messaging/pymessaging.c
+++ b/source4/lib/messaging/pymessaging.c
@@ -20,7 +20,7 @@
*/
#include "includes.h"
-#include <Python.h>
+#include "../lib/util/python_util.h"
#include "scripting/python/modules.h"
#include "libcli/util/pyerrors.h"
#include "librpc/rpc/pyrpc.h"
diff --git a/source4/lib/registry/pyregistry.c b/source4/lib/registry/pyregistry.c
index 444b80a..c28fcaa 100644
--- a/source4/lib/registry/pyregistry.c
+++ b/source4/lib/registry/pyregistry.c
@@ -18,7 +18,7 @@
*/
#include "includes.h"
-#include <Python.h>
+#include "../lib/util/python_util.h"
#include "libcli/util/pyerrors.h"
#include "lib/registry/registry.h"
#include "scripting/python/modules.h" /* for py_iconv_convenience() */
diff --git a/source4/lib/tdb_wrap.h b/source4/lib/tdb_wrap.h
index b97d88a..eb0191f 100644
--- a/source4/lib/tdb_wrap.h
+++ b/source4/lib/tdb_wrap.h
@@ -22,7 +22,7 @@
#ifndef _TDB_WRAP_H_
#define _TDB_WRAP_H_
-#include <tdb.h>
+#include "../lib/tdb/include/tdb.h"
struct tdb_wrap {
struct tdb_context *tdb;
diff --git a/source4/librpc/ndr/py_security.c b/source4/librpc/ndr/py_security.c
index 73837b6..5311ce1 100644
--- a/source4/librpc/ndr/py_security.c
+++ b/source4/librpc/ndr/py_security.c
@@ -16,6 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "../lib/util/python_util.h"
#include "libcli/security/security.h"
static void PyType_AddMethods(PyTypeObject *type, PyMethodDef *methods)
diff --git a/source4/librpc/rpc/pyrpc.c b/source4/librpc/rpc/pyrpc.c
index b841fda..1f29ad1 100644
--- a/source4/librpc/rpc/pyrpc.c
+++ b/source4/librpc/rpc/pyrpc.c
@@ -18,7 +18,7 @@
*/
#include "includes.h"
-#include <Python.h>
+#include "../lib/util/python_util.h"
#include <structmember.h>
#include "librpc/rpc/pyrpc.h"
#include "librpc/rpc/dcerpc.h"
diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c
index f6a0b4f..1eef02b 100644
--- a/source4/param/pyparam.c
+++ b/source4/param/pyparam.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "param/param.h"
#include "param/loadparm.h"
+#include "../lib/util/python_util.h"
#include "pytalloc.h"
/* There's no Py_ssize_t in 2.4, apparently */
diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c
index 6939979..b11b5a5 100644
--- a/source4/scripting/python/pyglue.c
+++ b/source4/scripting/python/pyglue.c
@@ -25,7 +25,7 @@
#include "lib/ldb-samba/ldif_handlers.h"
#include "librpc/ndr/libndr.h"
#include "version.h"
-#include <Python.h>
+#include "../lib/util/python_util.h"
#include "lib/ldb/pyldb.h"
#include "libcli/util/pyerrors.h"
#include "libcli/security/security.h"
diff --git a/source4/web_server/wsgi.c b/source4/web_server/wsgi.c
index 762de55..8ec30a4 100644
--- a/source4/web_server/wsgi.c
+++ b/source4/web_server/wsgi.c
@@ -25,7 +25,7 @@
#include "../lib/util/dlinklist.h"
#include "../lib/util/data_blob.h"
#include "lib/tls/tls.h"
-#include <Python.h>
+#include "../lib/util/python_util.h"
typedef struct {
PyObject_HEAD
--
Samba Shared Repository
More information about the samba-cvs
mailing list