summaryrefslogtreecommitdiffstats
path: root/RISCOS/Modules/drawfmodule.c
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2008-06-09 04:58:54 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2008-06-09 04:58:54 (GMT)
commitdd96db63f689e2f0d8ae5a1436b3b3395eec7de5 (patch)
treeb2299acac9ce44fc488fc7b2ae2a44548cd5fbb8 /RISCOS/Modules/drawfmodule.c
parente98839a1f48b2915f1cc747884e64f4d6e4c8e7a (diff)
downloadcpython-dd96db63f689e2f0d8ae5a1436b3b3395eec7de5.zip
cpython-dd96db63f689e2f0d8ae5a1436b3b3395eec7de5.tar.gz
cpython-dd96db63f689e2f0d8ae5a1436b3b3395eec7de5.tar.bz2
This reverts r63675 based on the discussion in this thread:
http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
Diffstat (limited to 'RISCOS/Modules/drawfmodule.c')
-rw-r--r--RISCOS/Modules/drawfmodule.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/RISCOS/Modules/drawfmodule.c b/RISCOS/Modules/drawfmodule.c
index 61aadd3..5f8dc3e 100644
--- a/RISCOS/Modules/drawfmodule.c
+++ b/RISCOS/Modules/drawfmodule.c
@@ -333,7 +333,7 @@ static PyObject *DrawF_FontTable(PyDrawFObject *self,PyObject *arg)
char *dtable;
if(!PyArg_ParseTuple(arg,"O!",&PyDict_Type,&d)) return NULL;
while(PyDict_Next(d,&n,&key,&value))
- { int m=PyBytes_Size(value);
+ { int m=PyString_Size(value);
if(m<0||!PyInt_Check(key)) return NULL;
size+=m+2;
}
@@ -350,9 +350,9 @@ static PyObject *DrawF_FontTable(PyDrawFObject *self,PyObject *arg)
memset(dtable,0,size-8);
n=0;
while(PyDict_Next(d,&n,&key,&value))
- { int m=PyBytes_Size(value);
+ { int m=PyString_Size(value);
*dtable=(char)PyInt_AsLong(key);
- strcpy(dtable+1,PyBytes_AsString(value));
+ strcpy(dtable+1,PyString_AsString(value));
dtable+=m+2;
}
Py_INCREF(Py_None);return Py_None;
@@ -609,8 +609,8 @@ static PyObject *PyDrawF_GetAttr(PyDrawFObject *s,char *name)
if (!strcmp(name, "__members__"))
{ PyObject *list = PyList_New(2);
if (list)
- { PyList_SetItem(list, 0, PyBytes_FromString("size"));
- PyList_SetItem(list, 1, PyBytes_FromString("start"));
+ { PyList_SetItem(list, 0, PyString_FromString("size"));
+ PyList_SetItem(list, 1, PyString_FromString("start"));
if (PyErr_Occurred()) { Py_DECREF(list);list = NULL;}
}
return list;
@@ -659,6 +659,6 @@ void initdrawf()
{ PyObject *m, *d;
m = Py_InitModule("drawf", DrawFMethods);
d = PyModule_GetDict(m);
- DrawFError=PyBytes_FromString("drawf.error");
+ DrawFError=PyString_FromString("drawf.error");
PyDict_SetItemString(d,"error",DrawFError);
}