Remove more global_loadparm instances, fix syntax errors.
authorJelmer Vernooij <jelmer@samba.org>
Fri, 24 Oct 2008 14:12:14 +0000 (16:12 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Fri, 24 Oct 2008 14:12:14 +0000 (16:12 +0200)
lib/util/charset/charset.h
lib/util/charset/util_unistr.c
libcli/nbt/pynbt.c

index f8b3f65548c20cdb8412351c0df6041e342e1099..21fc20b8c3d001601eb95fb246d230eec8fbafc4 100644 (file)
@@ -124,7 +124,7 @@ ssize_t convert_string(charset_t from, charset_t to,
 
 extern struct smb_iconv_convenience *global_iconv_convenience;
 
 
 extern struct smb_iconv_convenience *global_iconv_convenience;
 
-_PUBLIC_ codepoint_t next_codepoint(const char *str, size_t *size);
+codepoint_t next_codepoint(const char *str, size_t *size);
 
 /* codepoints */
 codepoint_t next_codepoint_convenience(struct smb_iconv_convenience *ic, 
 
 /* codepoints */
 codepoint_t next_codepoint_convenience(struct smb_iconv_convenience *ic, 
index c90b675ded67a8f87b0e16d1203b3381ceea7776..86a76f831ec4876b65bbf58a47f31957baebfa0e 100644 (file)
@@ -133,7 +133,7 @@ _PUBLIC_ int strncasecmp_m(const char *s1, const char *s2, size_t n)
                n--;
 
                c1 = next_codepoint_convenience(iconv_convenience, s1, &size1);
                n--;
 
                c1 = next_codepoint_convenience(iconv_convenience, s1, &size1);
-               c2 = next_codepoint_convenienceconv_convenience, s2, &size2);
+               c2 = next_codepoint_convenience(iconv_convenience, s2, &size2);
 
                s1 += size1;
                s2 += size2;
 
                s1 += size1;
                s2 += size2;
@@ -272,7 +272,7 @@ _PUBLIC_ size_t strlen_m(const char *s)
 
        while (*s) {
                size_t c_size;
 
        while (*s) {
                size_t c_size;
-               codepoint_t c = next_codepoint(ic, s, &c_size);
+               codepoint_t c = next_codepoint_convenience(ic, s, &c_size);
                if (c < 0x10000) {
                        count += 1;
                } else {
                if (c < 0x10000) {
                        count += 1;
                } else {
@@ -344,7 +344,7 @@ _PUBLIC_ char *strrchr_m(const char *s, char c)
 
        while (*s) {
                size_t size;
 
        while (*s) {
                size_t size;
-               codepoint_t c2 = next_codepoint(ic, s, &size);
+               codepoint_t c2 = next_codepoint_convenience(ic, s, &size);
                if (c2 == c) {
                        ret = discard_const_p(char, s);
                }
                if (c2 == c) {
                        ret = discard_const_p(char, s);
                }
@@ -466,7 +466,7 @@ _PUBLIC_ char *strupper_talloc_n(TALLOC_CTX *ctx, const char *src, size_t n)
 
        while (*src && n--) {
                size_t c_size;
 
        while (*src && n--) {
                size_t c_size;
-               codepoint_t c = next_codepoint(iconv_convenience, src, &c_size);
+               codepoint_t c = next_codepoint_convenience(iconv_convenience, src, &c_size);
                src += c_size;
 
                c = toupper_m(c);
                src += c_size;
 
                c = toupper_m(c);
index e49c1776a3379c5124d1d258ba23b237588ef47f..3200482491c7629630aa4a27784297d218699ad4 100644 (file)
@@ -20,9 +20,9 @@
 #include "includes.h"
 #include <Python.h>
 #include "libcli/util/pyerrors.h"
 #include "includes.h"
 #include <Python.h>
 #include "libcli/util/pyerrors.h"
+#include "scripting/python/modules.h"
 #include "../libcli/nbt/libnbt.h"
 #include "lib/events/events.h"
 #include "../libcli/nbt/libnbt.h"
 #include "lib/events/events.h"
-#include "param/param.h"
 
 PyAPI_DATA(PyTypeObject) nbt_node_Type;
 
 
 PyAPI_DATA(PyTypeObject) nbt_node_Type;
 
@@ -229,7 +229,7 @@ static PyObject *py_nbt_name_status(PyObject *self, PyObject *args, PyObject *kw
                return NULL;
        PyTuple_SetItem(ret, 0, PyString_FromString(io.out.reply_from));
 
                return NULL;
        PyTuple_SetItem(ret, 0, PyString_FromString(io.out.reply_from));
 
-       py_name = PyObject_FromNBTName(node->socket, lp_iconv_convenience(global_loadparm), &io.out.name);
+       py_name = PyObject_FromNBTName(node->socket, py_iconv_convenience(NULL), &io.out.name);
        if (py_name == NULL)
                return NULL;
 
        if (py_name == NULL)
                return NULL;
 
@@ -292,7 +292,7 @@ static PyObject *py_nbt_name_register(PyObject *self, PyObject *args, PyObject *
                return NULL;
        PyTuple_SetItem(ret, 0, PyString_FromString(io.out.reply_from));
 
                return NULL;
        PyTuple_SetItem(ret, 0, PyString_FromString(io.out.reply_from));
 
-       py_name = PyObject_FromNBTName(node->socket, lp_iconv_convenience(global_loadparm), &io.out.name);
+       py_name = PyObject_FromNBTName(node->socket, py_iconv_convenience(NULL), &io.out.name);
        if (py_name == NULL)
                return NULL;
 
        if (py_name == NULL)
                return NULL;
 
@@ -347,7 +347,7 @@ static PyObject *py_nbt_name_refresh(PyObject *self, PyObject *args, PyObject *k
                return NULL;
        PyTuple_SetItem(ret, 0, PyString_FromString(io.out.reply_from));
 
                return NULL;
        PyTuple_SetItem(ret, 0, PyString_FromString(io.out.reply_from));
 
-       py_name = PyObject_FromNBTName(node->socket, lp_iconv_convenience(global_loadparm), &io.out.name);
+       py_name = PyObject_FromNBTName(node->socket, py_iconv_convenience(NULL), &io.out.name);
        if (py_name == NULL)
                return NULL;
 
        if (py_name == NULL)
                return NULL;