diff options
author | Christian Heimes <christian@cheimes.de> | 2008-05-26 12:51:38 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-05-26 12:51:38 (GMT) |
commit | 593daf545bd9b7e7bcb27b498ecc6f36db9ae395 (patch) | |
tree | c0a57029b9ab0eb18a2bb4f8fd65f0817f1a1707 /Python/modsupport.c | |
parent | c3cb683d638e9d660c18a05293a576f98965166e (diff) | |
download | cpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.zip cpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.tar.gz cpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.tar.bz2 |
Renamed PyString to PyBytes
Diffstat (limited to 'Python/modsupport.c')
-rw-r--r-- | Python/modsupport.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c index d54158f..b23749f 100644 --- a/Python/modsupport.c +++ b/Python/modsupport.c @@ -65,7 +65,7 @@ Py_InitModule4(const char *name, PyMethodDef *methods, const char *doc, return NULL; d = PyModule_GetDict(m); if (methods != NULL) { - n = PyString_FromString(name); + n = PyBytes_FromString(name); if (n == NULL) return NULL; for (ml = methods; ml->ml_name != NULL; ml++) { @@ -92,7 +92,7 @@ Py_InitModule4(const char *name, PyMethodDef *methods, const char *doc, Py_DECREF(n); } if (doc != NULL) { - v = PyString_FromString(doc); + v = PyBytes_FromString(doc); if (v == NULL || PyDict_SetItemString(d, "__doc__", v) != 0) { Py_XDECREF(v); return NULL; @@ -391,7 +391,7 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags) { char p[1]; p[0] = (char)va_arg(*p_va, int); - return PyString_FromStringAndSize(p, 1); + return PyBytes_FromStringAndSize(p, 1); } case 's': @@ -423,7 +423,7 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags) } n = (Py_ssize_t)m; } - v = PyString_FromStringAndSize(str, n); + v = PyBytes_FromStringAndSize(str, n); } return v; } @@ -633,7 +633,7 @@ PyModule_AddIntConstant(PyObject *m, const char *name, long value) int PyModule_AddStringConstant(PyObject *m, const char *name, const char *value) { - PyObject *o = PyString_FromString(value); + PyObject *o = PyBytes_FromString(value); if (!o) return -1; if (PyModule_AddObject(m, name, o) == 0) |