From be33f4c611d37ebba59ff618033dc73601339ad1 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 23 Dec 2007 23:54:30 -0600 Subject: r26576: Allow the static module loading code to be used for the Python modules. Simplify the way module initialization functions are handled. (This used to be commit ba8be2dfc0de4434c798663336b81f7f95cde520) --- source4/param/param.i | 2 +- source4/param/param_wrap.c | 2 +- source4/param/share.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/param') diff --git a/source4/param/param.i b/source4/param/param.i index 55c7b3fe0c..11cda9910a 100644 --- a/source4/param/param.i +++ b/source4/param/param.i @@ -186,7 +186,7 @@ typedef struct param_context { struct param_opt *opt = param_get_add($self, parameter, section_name); talloc_free(opt->value); - opt->value = talloc_strdup(opt, PyObject_Str(ob)); + opt->value = talloc_strdup(opt, PyString_AsString(PyObject_Str(ob))); return 0; } diff --git a/source4/param/param_wrap.c b/source4/param/param_wrap.c index d594955f38..49c986aeb7 100644 --- a/source4/param/param_wrap.c +++ b/source4/param/param_wrap.c @@ -2747,7 +2747,7 @@ SWIGINTERN int param_set(param *self,char const *parameter,PyObject *ob,char con struct param_opt *opt = param_get_add(self, parameter, section_name); talloc_free(opt->value); - opt->value = talloc_strdup(opt, PyObject_Str(ob)); + opt->value = talloc_strdup(opt, PyString_AsString(PyObject_Str(ob))); return 0; } diff --git a/source4/param/share.c b/source4/param/share.c index 2ada9999ea..edbb68b5f0 100644 --- a/source4/param/share.c +++ b/source4/param/share.c @@ -146,7 +146,7 @@ NTSTATUS share_get_context_by_name(TALLOC_CTX *mem_ctx, const char *backend_name */ NTSTATUS share_init(void) { - init_module_fn static_init[] = STATIC_share_MODULES; + init_module_fn static_init[] = { STATIC_share_MODULES, NULL }; run_init_functions(static_init); -- cgit