summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-09-28 20:20:48 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-09-28 20:20:48 (GMT)
commite57b1c0da18c20dae31fdc6cda7c9e2cb3b07bff (patch)
treef6020e47a80c3b0e4ec626612ead9fbdf1c3647d /Objects
parentff9e50fd047399873059328d992db0bfe32bfe10 (diff)
downloadcpython-e57b1c0da18c20dae31fdc6cda7c9e2cb3b07bff.zip
cpython-e57b1c0da18c20dae31fdc6cda7c9e2cb3b07bff.tar.gz
cpython-e57b1c0da18c20dae31fdc6cda7c9e2cb3b07bff.tar.bz2
Mark PyUnicode_FromUCS[124] as private
Diffstat (limited to 'Objects')
-rw-r--r--Objects/stringlib/ucs1lib.h2
-rw-r--r--Objects/stringlib/ucs2lib.h2
-rw-r--r--Objects/stringlib/ucs4lib.h2
-rw-r--r--Objects/unicodeobject.c20
4 files changed, 13 insertions, 13 deletions
diff --git a/Objects/stringlib/ucs1lib.h b/Objects/stringlib/ucs1lib.h
index 4685c17..c0f7adf 100644
--- a/Objects/stringlib/ucs1lib.h
+++ b/Objects/stringlib/ucs1lib.h
@@ -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
diff --git a/Objects/stringlib/ucs2lib.h b/Objects/stringlib/ucs2lib.h
index 1bb9c27..fc62fb7 100644
--- a/Objects/stringlib/ucs2lib.h
+++ b/Objects/stringlib/ucs2lib.h
@@ -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
diff --git a/Objects/stringlib/ucs4lib.h b/Objects/stringlib/ucs4lib.h
index 776d65f..be1206a 100644
--- a/Objects/stringlib/ucs4lib.h
+++ b/Objects/stringlib/ucs4lib.h
@@ -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
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index b53c210..68977f4 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -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 */