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/Mac/Modules/Nav.c b/Mac/Modules/Nav.c
index 3e2d9d6..e03a06e 100644
--- a/Mac/Modules/Nav.c
+++ b/Mac/Modules/Nav.c
@@ -139,11 +139,11 @@
NavGetDefaultDialogOptions(opt);
while ( PyDict_Next(d, &pos, &key, &value) ) {
- if ( !key || !value || !PyBytes_Check(key) ) {
+ if ( !key || !value || !PyString_Check(key) ) {
PyErr_SetString(ErrorObject, "DialogOption has non-string key");
return 0;
}
- keystr = PyBytes_AsString(key);
+ keystr = PyString_AsString(key);
if( strcmp(keystr, "defaultLocation") == 0 ) {
if ( (defaultLocation_storage = PyMem_NEW(AEDesc, 1)) == NULL ) {
PyErr_NoMemory();
@@ -963,7 +963,7 @@
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
- ErrorObject = PyBytes_FromString("Nav.error");
+ ErrorObject = PyString_FromString("Nav.error");
PyDict_SetItemString(d, "error", ErrorObject);
/* XXXX Add constants here */