diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-12-22 04:38:57 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-12-22 04:38:57 +0100 |
commit | d58270c5373416997cc70fe392b307a4522e43d9 (patch) | |
tree | 08e833856d97b6e412b703e72308da9ffee2f3ac /source4 | |
parent | 24b62772ab78a84d4a35f5eb15e327b6b76782b0 (diff) | |
download | samba-d58270c5373416997cc70fe392b307a4522e43d9.tar.gz samba-d58270c5373416997cc70fe392b307a4522e43d9.tar.bz2 samba-d58270c5373416997cc70fe392b307a4522e43d9.zip |
Add header for pyparam.
Diffstat (limited to 'source4')
-rw-r--r-- | source4/auth/credentials/pycredentials.c | 4 | ||||
-rw-r--r-- | source4/auth/pyauth.c | 5 | ||||
-rw-r--r-- | source4/lib/registry/pyregistry.c | 2 | ||||
-rw-r--r-- | source4/librpc/rpc/pyrpc.c | 2 | ||||
-rw-r--r-- | source4/param/provision.c | 2 | ||||
-rw-r--r-- | source4/param/pyparam.h | 25 | ||||
-rw-r--r-- | source4/scripting/python/pyglue.c | 2 |
7 files changed, 31 insertions, 11 deletions
diff --git a/source4/auth/credentials/pycredentials.c b/source4/auth/credentials/pycredentials.c index 5f3801cdf6..4fa9fe5696 100644 --- a/source4/auth/credentials/pycredentials.c +++ b/source4/auth/credentials/pycredentials.c @@ -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) { diff --git a/source4/auth/pyauth.c b/source4/auth/pyauth.c index cc717bf42f..e97174fcc3 100644 --- a/source4/auth/pyauth.c +++ b/source4/auth/pyauth.c @@ -20,10 +20,7 @@ #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", diff --git a/source4/lib/registry/pyregistry.c b/source4/lib/registry/pyregistry.c index b93071f703..2d2f2fb685 100644 --- a/source4/lib/registry/pyregistry.c +++ b/source4/lib/registry/pyregistry.c @@ -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; diff --git a/source4/librpc/rpc/pyrpc.c b/source4/librpc/rpc/pyrpc.c index a59f355d43..83bd642581 100644 --- a/source4/librpc/rpc/pyrpc.c +++ b/source4/librpc/rpc/pyrpc.c @@ -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; diff --git a/source4/param/provision.c b/source4/param/provision.c index b207cf6145..7a06f77d96 100644 --- a/source4/param/provision.c +++ b/source4/param/provision.c @@ -28,12 +28,12 @@ #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 index 0000000000..4d7e32d908 --- /dev/null +++ b/source4/param/pyparam.h @@ -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_ */ diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c index fc9c4a94b5..1b59978477 100644 --- a/source4/scripting/python/pyglue.c +++ b/source4/scripting/python/pyglue.c @@ -29,10 +29,10 @@ #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) \ |