]> granicus.if.org Git - python/commitdiff
Mark PyUnicode_FromUCS[124] as private
authorVictor Stinner <victor.stinner@haypocalc.com>
Wed, 28 Sep 2011 20:20:48 +0000 (22:20 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Wed, 28 Sep 2011 20:20:48 +0000 (22:20 +0200)
Objects/stringlib/ucs1lib.h
Objects/stringlib/ucs2lib.h
Objects/stringlib/ucs4lib.h
Objects/unicodeobject.c

index 4685c17650c234ec46c6d28a2ee226c462f44122..c0f7adf3adb2db45ceb9b6854300d8bfbfcd3099 100644 (file)
@@ -19,7 +19,7 @@
 #define STRINGLIB_FILL           Py_UNICODE_FILL
 #define STRINGLIB_STR            PyUnicode_1BYTE_DATA
 #define STRINGLIB_LEN            PyUnicode_GET_LENGTH
-#define STRINGLIB_NEW            PyUnicode_FromUCS1
+#define STRINGLIB_NEW            _PyUnicode_FromUCS1
 #define STRINGLIB_RESIZE         not_supported
 #define STRINGLIB_CHECK          PyUnicode_Check
 #define STRINGLIB_CHECK_EXACT    PyUnicode_CheckExact
index 1bb9c278a7834f2b48b1676c8b0be9d1a1ba3f73..fc62fb7b3b5345572b97317e7605af9bc59f5050 100644 (file)
@@ -19,7 +19,7 @@
 #define STRINGLIB_FILL           Py_UNICODE_FILL
 #define STRINGLIB_STR            PyUnicode_1BYTE_DATA
 #define STRINGLIB_LEN            PyUnicode_GET_LENGTH
-#define STRINGLIB_NEW            PyUnicode_FromUCS2
+#define STRINGLIB_NEW            _PyUnicode_FromUCS2
 #define STRINGLIB_RESIZE         not_supported
 #define STRINGLIB_CHECK          PyUnicode_Check
 #define STRINGLIB_CHECK_EXACT    PyUnicode_CheckExact
index 776d65fc3c440b8677f2389ee677d791a4e1fb22..be1206a6d5fe17025dd42ea48e8d815759d9b188 100644 (file)
@@ -19,7 +19,7 @@
 #define STRINGLIB_FILL           Py_UNICODE_FILL
 #define STRINGLIB_STR            PyUnicode_1BYTE_DATA
 #define STRINGLIB_LEN            PyUnicode_GET_LENGTH
-#define STRINGLIB_NEW            PyUnicode_FromUCS4
+#define STRINGLIB_NEW            _PyUnicode_FromUCS4
 #define STRINGLIB_RESIZE         not_supported
 #define STRINGLIB_CHECK          PyUnicode_Check
 #define STRINGLIB_CHECK_EXACT    PyUnicode_CheckExact
index b53c210428892d16363ac7b8beb4968b05720a3d..68977f4fee0f4a5ff467348d955d3260b9f90000 100644 (file)
@@ -1117,8 +1117,8 @@ PyUnicode_FromString(const char *u)
     return PyUnicode_FromStringAndSize(u, size);
 }
 
-PyObject*
-PyUnicode_FromUCS1(const unsigned char* u, Py_ssize_t size)
+static PyObject*
+_PyUnicode_FromUCS1(const unsigned char* u, Py_ssize_t size)
 {
     PyObject *res;
     unsigned char max = 127;
@@ -1136,8 +1136,8 @@ PyUnicode_FromUCS1(const unsigned char* u, Py_ssize_t size)
     return res;
 }
 
-PyObject*
-PyUnicode_FromUCS2(const Py_UCS2 *u, Py_ssize_t size)
+static PyObject*
+_PyUnicode_FromUCS2(const Py_UCS2 *u, Py_ssize_t size)
 {
     PyObject *res;
     Py_UCS2 max = 0;
@@ -1156,8 +1156,8 @@ PyUnicode_FromUCS2(const Py_UCS2 *u, Py_ssize_t size)
     return res;
 }
 
-PyObject*
-PyUnicode_FromUCS4(const Py_UCS4 *u, Py_ssize_t size)
+static PyObject*
+_PyUnicode_FromUCS4(const Py_UCS4 *u, Py_ssize_t size)
 {
     PyObject *res;
     Py_UCS4 max = 0;
@@ -1184,11 +1184,11 @@ PyUnicode_FromKindAndData(int kind, const void *buffer, Py_ssize_t size)
 {
     switch(kind) {
     case PyUnicode_1BYTE_KIND:
-        return PyUnicode_FromUCS1(buffer, size);
+        return _PyUnicode_FromUCS1(buffer, size);
     case PyUnicode_2BYTE_KIND:
-        return PyUnicode_FromUCS2(buffer, size);
+        return _PyUnicode_FromUCS2(buffer, size);
     case PyUnicode_4BYTE_KIND:
-        return PyUnicode_FromUCS4(buffer, size);
+        return _PyUnicode_FromUCS4(buffer, size);
     }
     assert(0);
     return NULL;
@@ -5645,7 +5645,7 @@ PyUnicode_DecodeLatin1(const char *s,
                       const char *errors)
 {
     /* Latin-1 is equivalent to the first 256 ordinals in Unicode. */
-    return PyUnicode_FromUCS1((unsigned char*)s, size);
+    return _PyUnicode_FromUCS1((unsigned char*)s, size);
 }
 
 /* create or adjust a UnicodeEncodeError */