diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2011-08-10 15:15:18 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2011-08-10 15:36:21 +0200 |
commit | f8ec7f6cb19c4cc27398bdc0482b531e601d4291 (patch) | |
tree | 52c06e88c413547579c9e804a5c78d96e46bd4ba /source4/param | |
parent | 8338fe4bfbc935e3cff059383dd07d419f58c696 (diff) | |
download | samba-f8ec7f6cb19c4cc27398bdc0482b531e601d4291.tar.gz samba-f8ec7f6cb19c4cc27398bdc0482b531e601d4291.tar.bz2 samba-f8ec7f6cb19c4cc27398bdc0482b531e601d4291.zip |
pytalloc: Use consistent prefix for functions, add ABI file.
Diffstat (limited to 'source4/param')
-rw-r--r-- | source4/param/provision.c | 2 | ||||
-rw-r--r-- | source4/param/pyparam.c | 38 | ||||
-rw-r--r-- | source4/param/pyparam_util.c | 2 |
3 files changed, 21 insertions, 21 deletions
diff --git a/source4/param/provision.c b/source4/param/provision.c index 54b60730dd..6663f269a8 100644 --- a/source4/param/provision.c +++ b/source4/param/provision.c @@ -203,7 +203,7 @@ static PyObject *py_dom_sid_FromSid(struct dom_sid *sid) if (dom_sid_Type == NULL) return NULL; - return py_talloc_reference((PyTypeObject *)dom_sid_Type, sid); + return pytalloc_reference((PyTypeObject *)dom_sid_Type, sid); } NTSTATUS provision_store_self_join(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c index b4901ca02e..f46926105a 100644 --- a/source4/param/pyparam.c +++ b/source4/param/pyparam.c @@ -32,15 +32,15 @@ typedef int Py_ssize_t; typedef inquiry lenfunc; #endif -#define PyLoadparmContext_AsLoadparmContext(obj) py_talloc_get_type(obj, struct loadparm_context) -#define PyLoadparmService_AsLoadparmService(obj) py_talloc_get_type(obj, struct loadparm_service) +#define PyLoadparmContext_AsLoadparmContext(obj) pytalloc_get_type(obj, struct loadparm_context) +#define PyLoadparmService_AsLoadparmService(obj) pytalloc_get_type(obj, struct loadparm_service) extern PyTypeObject PyLoadparmContext; extern PyTypeObject PyLoadparmService; static PyObject *PyLoadparmService_FromService(struct loadparm_service *service) { - return py_talloc_reference(&PyLoadparmService, service); + return pytalloc_reference(&PyLoadparmService, service); } static PyObject *py_lp_ctx_get_helper(struct loadparm_context *lp_ctx, const char *service_name, const char *param_name) @@ -150,7 +150,7 @@ static PyObject *py_lp_ctx_get_helper(struct loadparm_context *lp_ctx, const cha } -static PyObject *py_lp_ctx_load(py_talloc_Object *self, PyObject *args) +static PyObject *py_lp_ctx_load(pytalloc_Object *self, PyObject *args) { char *filename; bool ret; @@ -166,7 +166,7 @@ static PyObject *py_lp_ctx_load(py_talloc_Object *self, PyObject *args) Py_RETURN_NONE; } -static PyObject *py_lp_ctx_load_default(py_talloc_Object *self) +static PyObject *py_lp_ctx_load_default(pytalloc_Object *self) { bool ret; ret = lpcfg_load_default(PyLoadparmContext_AsLoadparmContext(self)); @@ -178,7 +178,7 @@ static PyObject *py_lp_ctx_load_default(py_talloc_Object *self) Py_RETURN_NONE; } -static PyObject *py_lp_ctx_get(py_talloc_Object *self, PyObject *args) +static PyObject *py_lp_ctx_get(pytalloc_Object *self, PyObject *args) { char *param_name; char *section_name = NULL; @@ -192,7 +192,7 @@ static PyObject *py_lp_ctx_get(py_talloc_Object *self, PyObject *args) return ret; } -static PyObject *py_lp_ctx_is_myname(py_talloc_Object *self, PyObject *args) +static PyObject *py_lp_ctx_is_myname(pytalloc_Object *self, PyObject *args) { char *name; if (!PyArg_ParseTuple(args, "s", &name)) @@ -201,7 +201,7 @@ static PyObject *py_lp_ctx_is_myname(py_talloc_Object *self, PyObject *args) return PyBool_FromLong(lpcfg_is_myname(PyLoadparmContext_AsLoadparmContext(self), name)); } -static PyObject *py_lp_ctx_is_mydomain(py_talloc_Object *self, PyObject *args) +static PyObject *py_lp_ctx_is_mydomain(pytalloc_Object *self, PyObject *args) { char *name; if (!PyArg_ParseTuple(args, "s", &name)) @@ -210,7 +210,7 @@ static PyObject *py_lp_ctx_is_mydomain(py_talloc_Object *self, PyObject *args) return PyBool_FromLong(lpcfg_is_mydomain(PyLoadparmContext_AsLoadparmContext(self), name)); } -static PyObject *py_lp_ctx_set(py_talloc_Object *self, PyObject *args) +static PyObject *py_lp_ctx_set(pytalloc_Object *self, PyObject *args) { char *name, *value; bool ret; @@ -226,7 +226,7 @@ static PyObject *py_lp_ctx_set(py_talloc_Object *self, PyObject *args) Py_RETURN_NONE; } -static PyObject *py_lp_ctx_private_path(py_talloc_Object *self, PyObject *args) +static PyObject *py_lp_ctx_private_path(pytalloc_Object *self, PyObject *args) { char *name, *path; PyObject *ret; @@ -240,7 +240,7 @@ static PyObject *py_lp_ctx_private_path(py_talloc_Object *self, PyObject *args) return ret; } -static PyObject *py_lp_ctx_services(py_talloc_Object *self) +static PyObject *py_lp_ctx_services(pytalloc_Object *self) { struct loadparm_context *lp_ctx = PyLoadparmContext_AsLoadparmContext(self); PyObject *ret; @@ -314,12 +314,12 @@ static PyMethodDef py_lp_ctx_methods[] = { { NULL } }; -static PyObject *py_lp_ctx_default_service(py_talloc_Object *self, void *closure) +static PyObject *py_lp_ctx_default_service(pytalloc_Object *self, void *closure) { return PyLoadparmService_FromService(lpcfg_default_service(PyLoadparmContext_AsLoadparmContext(self))); } -static PyObject *py_lp_ctx_config_file(py_talloc_Object *self, void *closure) +static PyObject *py_lp_ctx_config_file(pytalloc_Object *self, void *closure) { const char *configfile = lpcfg_configfile(PyLoadparmContext_AsLoadparmContext(self)); if (configfile == NULL) @@ -337,7 +337,7 @@ static PyGetSetDef py_lp_ctx_getset[] = { static PyObject *py_lp_ctx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { - py_talloc_Object *ret = (py_talloc_Object *)type->tp_alloc(type, 0); + pytalloc_Object *ret = (pytalloc_Object *)type->tp_alloc(type, 0); if (ret == NULL) { PyErr_NoMemory(); return NULL; @@ -355,12 +355,12 @@ static PyObject *py_lp_ctx_new(PyTypeObject *type, PyObject *args, PyObject *kwa return (PyObject *)ret; } -static Py_ssize_t py_lp_ctx_len(py_talloc_Object *self) +static Py_ssize_t py_lp_ctx_len(pytalloc_Object *self) { return lpcfg_numservices(PyLoadparmContext_AsLoadparmContext(self)); } -static PyObject *py_lp_ctx_getitem(py_talloc_Object *self, PyObject *name) +static PyObject *py_lp_ctx_getitem(pytalloc_Object *self, PyObject *name) { struct loadparm_service *service; if (!PyString_Check(name)) { @@ -382,7 +382,7 @@ static PyMappingMethods py_lp_ctx_mapping = { PyTypeObject PyLoadparmContext = { .tp_name = "param.LoadParm", - .tp_basicsize = sizeof(py_talloc_Object), + .tp_basicsize = sizeof(pytalloc_Object), .tp_getset = py_lp_ctx_getset, .tp_methods = py_lp_ctx_methods, .tp_new = py_lp_ctx_new, @@ -429,7 +429,7 @@ static PyMethodDef py_lp_service_methods[] = { PyTypeObject PyLoadparmService = { .tp_name = "param.LoadparmService", - .tp_basicsize = sizeof(py_talloc_Object), + .tp_basicsize = sizeof(pytalloc_Object), .tp_methods = py_lp_service_methods, .tp_flags = Py_TPFLAGS_DEFAULT, }; @@ -462,7 +462,7 @@ static PyMethodDef pyparam_methods[] = { void initparam(void) { PyObject *m; - PyTypeObject *talloc_type = PyTalloc_GetObjectType(); + PyTypeObject *talloc_type = pytalloc_GetObjectType(); if (talloc_type == NULL) return; diff --git a/source4/param/pyparam_util.c b/source4/param/pyparam_util.c index cbf2095e85..969226f4f7 100644 --- a/source4/param/pyparam_util.c +++ b/source4/param/pyparam_util.c @@ -24,7 +24,7 @@ #include "param/loadparm.h" #include "lib/talloc/pytalloc.h" -#define PyLoadparmContext_AsLoadparmContext(obj) py_talloc_get_type(obj, struct loadparm_context) +#define PyLoadparmContext_AsLoadparmContext(obj) pytalloc_get_type(obj, struct loadparm_context) _PUBLIC_ struct loadparm_context *lpcfg_from_py_object(TALLOC_CTX *mem_ctx, PyObject *py_obj) { |