1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

Fix unresolved symbol in python messaging module.

This commit is contained in:
Jelmer Vernooij 2009-06-02 15:00:41 +02:00
parent ac9ff3574d
commit 8d966fac41
5 changed files with 14 additions and 13 deletions

View File

@ -13,6 +13,6 @@ MESSAGING_OBJ_FILES = $(libmessagingsrcdir)/messaging.o
[PYTHON::python_messaging] [PYTHON::python_messaging]
LIBRARY_REALNAME = samba/messaging.$(SHLIBEXT) LIBRARY_REALNAME = samba/messaging.$(SHLIBEXT)
PRIVATE_DEPENDENCIES = MESSAGING LIBEVENTS python_irpc PRIVATE_DEPENDENCIES = MESSAGING LIBEVENTS python_irpc pyparam_util
python_messaging_OBJ_FILES = $(libmessagingsrcdir)/pymessaging.o python_messaging_OBJ_FILES = $(libmessagingsrcdir)/pymessaging.o

View File

@ -29,6 +29,7 @@
#include "lib/events/events.h" #include "lib/events/events.h"
#include "cluster/cluster.h" #include "cluster/cluster.h"
#include "param/param.h" #include "param/param.h"
#include "param/pyparam.h"
#ifndef Py_RETURN_NONE #ifndef Py_RETURN_NONE
#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None #define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
@ -37,9 +38,6 @@
PyAPI_DATA(PyTypeObject) messaging_Type; PyAPI_DATA(PyTypeObject) messaging_Type;
PyAPI_DATA(PyTypeObject) irpc_ClientConnectionType; PyAPI_DATA(PyTypeObject) irpc_ClientConnectionType;
/* FIXME: This prototype should be in param/pyparam.h */
struct loadparm_context *py_default_loadparm_context(TALLOC_CTX *mem_ctx);
/* FIXME: This prototype should be in py_irpc.h, or shared otherwise */ /* FIXME: This prototype should be in py_irpc.h, or shared otherwise */
extern const struct PyNdrRpcMethodDef py_ndr_irpc_methods[]; extern const struct PyNdrRpcMethodDef py_ndr_irpc_methods[];

View File

@ -325,15 +325,6 @@ PyTypeObject PyLoadparmService = {
.tp_flags = Py_TPFLAGS_DEFAULT, .tp_flags = Py_TPFLAGS_DEFAULT,
}; };
struct loadparm_context *py_default_loadparm_context(TALLOC_CTX *mem_ctx)
{
struct loadparm_context *ret;
ret = loadparm_init(mem_ctx);
if (!lp_load_default(ret))
return NULL;
return ret;
}
static PyObject *py_default_path(PyObject *self) static PyObject *py_default_path(PyObject *self)
{ {
return PyString_FromString(lp_default_path()); return PyString_FromString(lp_default_path());

View File

@ -21,5 +21,6 @@
#define _PYPARAM_H_ #define _PYPARAM_H_
_PUBLIC_ struct loadparm_context *lp_from_py_object(PyObject *py_obj); _PUBLIC_ struct loadparm_context *lp_from_py_object(PyObject *py_obj);
_PUBLIC_ struct loadparm_context *py_default_loadparm_context(TALLOC_CTX *mem_ctx);
#endif /* _PYPARAM_H_ */ #endif /* _PYPARAM_H_ */

View File

@ -52,3 +52,14 @@ _PUBLIC_ struct loadparm_context *lp_from_py_object(PyObject *py_obj)
return PyLoadparmContext_AsLoadparmContext(py_obj); return PyLoadparmContext_AsLoadparmContext(py_obj);
} }
struct loadparm_context *py_default_loadparm_context(TALLOC_CTX *mem_ctx)
{
struct loadparm_context *ret;
ret = loadparm_init(mem_ctx);
if (!lp_load_default(ret))
return NULL;
return ret;
}