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.
diff --git a/RISCOS/Modules/riscosmodule.c b/RISCOS/Modules/riscosmodule.c
index cf37e18..3dabb4d 100644
--- a/RISCOS/Modules/riscosmodule.c
+++ b/RISCOS/Modules/riscosmodule.c
@@ -79,9 +79,9 @@
char *buf;
e=xosfscontrol_canonicalise_path(path,0,0,0,0,&len);
if(e) return riscos_oserror();
- obj=PyBytes_FromStringAndSize(NULL,-len);
+ obj=PyString_FromStringAndSize(NULL,-len);
if(obj==NULL) return NULL;
- buf=PyBytes_AsString(obj);
+ buf=PyString_AsString(obj);
e=xosfscontrol_canonicalise_path(path,buf,0,0,1-len,&len);
if(len!=1) return riscos_error("Error expanding path");
if(!e) return obj;
@@ -131,7 +131,7 @@
{ Py_DECREF(d);return riscos_oserror();
}
if(count)
- { v=PyBytes_FromString(buf);
+ { v=PyString_FromString(buf);
if(!v) { Py_DECREF(d);return 0;}
if(PyList_Append(d,v)) {Py_DECREF(d);Py_DECREF(v);return 0;}
}
@@ -320,7 +320,7 @@
char *name,*value;
if(!PyArg_ParseTuple(args,"s:getenv",&name)) return NULL;
value=getenv(name);
- if(value) return PyBytes_FromString(value);
+ if(value) return PyString_FromString(value);
Py_INCREF(Py_None);
return Py_None;
}
@@ -371,7 +371,7 @@
os_VARTYPE_EXPANDED,&size,(int *)&context,0))
{ PyObject *v;
value[size]='\0';
- v = PyBytes_FromString(value);
+ v = PyString_FromString(value);
if (v == NULL) continue;
PyDict_SetItemString(dict, context, v);
Py_DECREF(v);