Add header for pyparam.
authorJelmer Vernooij <jelmer@samba.org>
Mon, 22 Dec 2008 03:38:57 +0000 (04:38 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 22 Dec 2008 03:38:57 +0000 (04:38 +0100)
source4/auth/credentials/pycredentials.c
source4/auth/pyauth.c
source4/lib/registry/pyregistry.c
source4/librpc/rpc/pyrpc.c
source4/param/provision.c
source4/param/pyparam.h [new file with mode: 0644]
source4/scripting/python/pyglue.c

index 5f3801cdf63c172aecdd6777f1530caa1d7568fc..4fa9fe56963f866b31a5a448f4c651ea550a0d51 100644 (file)
@@ -22,9 +22,7 @@
 #include "lib/cmdline/credentials.h"
 #include "librpc/gen_ndr/samr.h" /* for struct samr_Password */
 #include "libcli/util/pyerrors.h"
-
-/* Here until param/param.i gets rewritten in "manual" C */
-extern struct loadparm_context *lp_from_py_object(PyObject *py_obj);
+#include "param/pyparam.h"
 
 struct cli_credentials *cli_credentials_from_py_object(PyObject *py_obj)
 {
index cc717bf42f52dbce57c230ba121047995c8a8527..e97174fcc3a73f30790f200942cb8cb01abad492 100644 (file)
 #include "param/param.h"
 #include "pyauth.h"
 #include "auth/system_session_proto.h"
-
-/* FIXME: These should be in a header file somewhere, once we finish moving
- * away from SWIG .. */
-extern struct loadparm_context *lp_from_py_object(PyObject *py_obj);
+#include "param/pyparam.h"
 
 PyTypeObject PyAuthSession = {
        .tp_name = "AuthSession",
index b93071f703121cbae993131311bbf5d1e0087a68..2d2f2fb6859ed3d204e5f8cc39cd762f865440e6 100644 (file)
@@ -24,8 +24,8 @@
 #include "scripting/python/modules.h" /* for py_iconv_convenience() */
 #include <pytalloc.h>
 #include <tevent.h>
+#include "param/pyparam.h"
 
-extern struct loadparm_context *lp_from_py_object(PyObject *py_obj);
 extern struct cli_credentials *cli_credentials_from_py_object(PyObject *py_obj);
 
 PyAPI_DATA(PyTypeObject) PyRegistryKey;
index a59f355d436411732f819969808d59e4777bbac4..83bd64258178dd739a95948e2cf1a0f4ddb1509f 100644 (file)
@@ -23,6 +23,7 @@
 #include "librpc/rpc/pyrpc.h"
 #include "librpc/rpc/dcerpc.h"
 #include "lib/events/events.h"
+#include "param/pyparam.h"
 
 static PyObject *py_dcerpc_run_function(dcerpc_InterfaceObject *iface, struct PyNdrRpcMethodDef *md, PyObject *args, PyObject *kwargs)
 {
@@ -315,7 +316,6 @@ static PyObject *dcerpc_interface_new(PyTypeObject *self, PyObject *args, PyObje
        const char *kwnames[] = {
                "binding", "syntax", "lp_ctx", "credentials", "basis_connection", NULL
        };
-       extern struct loadparm_context *lp_from_py_object(PyObject *py_obj);
        extern struct cli_credentials *cli_credentials_from_py_object(PyObject *py_obj);
        struct ndr_interface_table *table;
 
index b207cf614599869f9b150c59f0759563d2cc5aee..7a06f77d968fb05011b0836f48c38d3b23bdd18f 100644 (file)
 #include <Python.h>
 #include "scripting/python/modules.h"
 #include "lib/ldb/pyldb.h"
+#include "param/pyparam.h"
 
 NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
                        struct provision_settings *settings, 
                        struct provision_result *result)
 {
-       extern struct loadparm_context *lp_from_py_object(PyObject *py_obj);
        PyObject *provision_mod, *provision_dict, *provision_fn, *py_result, *parameters;
        
        DEBUG(0,("Provision for Become-DC test using python\n"));
diff --git a/source4/param/pyparam.h b/source4/param/pyparam.h
new file mode 100644 (file)
index 0000000..4d7e32d
--- /dev/null
@@ -0,0 +1,25 @@
+/* 
+   Unix SMB/CIFS implementation.
+   Samba utility functions
+   Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2008
+   
+   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
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _PYPARAM_H_
+#define _PYPARAM_H_
+
+struct loadparm_context *lp_from_py_object(PyObject *py_obj);
+
+#endif /* _PYPARAM_H_ */
index fc9c4a94b56717f9483b85dbfb332106dcf2048f..1b599784778f0dd0126b65636e1ad94dcc9b0f1b 100644 (file)
 #include "libcli/util/pyerrors.h"
 #include "libcli/security/security.h"
 #include "auth/pyauth.h"
+#include "param/pyparam.h"
 
 /* FIXME: These should be in a header file somewhere, once we finish moving
  * away from SWIG .. */
-extern struct loadparm_context *lp_from_py_object(PyObject *py_obj);
 extern struct cli_credentials *cli_credentials_from_py_object(PyObject *py_obj);
 
 #define PyErr_LDB_OR_RAISE(py_ldb, ldb) \