summaryrefslogtreecommitdiff
path: root/RISCOS/Modules/riscosmodule.c
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2008-06-09 04:58:54 +0000
committerGregory P. Smith <greg@mad-scientist.com>2008-06-09 04:58:54 +0000
commitdd96db63f689e2f0d8ae5a1436b3b3395eec7de5 (patch)
treeb2299acac9ce44fc488fc7b2ae2a44548cd5fbb8 /RISCOS/Modules/riscosmodule.c
parente98839a1f48b2915f1cc747884e64f4d6e4c8e7a (diff)
downloadcpython-git-dd96db63f689e2f0d8ae5a1436b3b3395eec7de5.tar.gz
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/riscosmodule.c')
-rw-r--r--RISCOS/Modules/riscosmodule.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/RISCOS/Modules/riscosmodule.c b/RISCOS/Modules/riscosmodule.c
index cf37e182c3..3dabb4d589 100644
--- a/RISCOS/Modules/riscosmodule.c
+++ b/RISCOS/Modules/riscosmodule.c
@@ -79,9 +79,9 @@ canon(char *path)
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 @@ riscos_listdir(PyObject *self, PyObject *args)
{ 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 @@ riscos_getenv(PyObject *self, PyObject *args)
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 @@ riscos_getenvdict(PyObject *self, PyObject *args)
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);