diff Objects/codeobject.c @ 47301:23ab586c427a

Renamed PyString to PyBytes
author Christian Heimes <christian@cheimes.de>
date Mon, 26 May 2008 13:28:38 +0000
parents b70485011214
children 85b67fb5672b
line wrap: on
line diff
--- a/Objects/codeobject.c	Mon May 26 13:22:05 2008 +0000
+++ b/Objects/codeobject.c	Mon May 26 13:28:38 2008 +0000
@@ -63,7 +63,7 @@
 	    cellvars == NULL || !PyTuple_Check(cellvars) ||
 	    name == NULL || !PyUnicode_Check(name) ||
 	    filename == NULL || !PyUnicode_Check(filename) ||
-	    lnotab == NULL || !PyString_Check(lnotab) ||
+	    lnotab == NULL || !PyBytes_Check(lnotab) ||
 	    !PyObject_CheckReadBuffer(code)) {
 		PyErr_BadInternalCall();
 		return NULL;
@@ -478,8 +478,8 @@
 int
 PyCode_Addr2Line(PyCodeObject *co, int addrq)
 {
-	int size = PyString_Size(co->co_lnotab) / 2;
-	unsigned char *p = (unsigned char*)PyString_AsString(co->co_lnotab);
+	int size = PyBytes_Size(co->co_lnotab) / 2;
+	unsigned char *p = (unsigned char*)PyBytes_AsString(co->co_lnotab);
 	int line = co->co_firstlineno;
 	int addr = 0;
 	while (--size >= 0) {
@@ -574,8 +574,8 @@
         int size, addr, line;
         unsigned char* p;
 
-        p = (unsigned char*)PyString_AS_STRING(co->co_lnotab);
-        size = PyString_GET_SIZE(co->co_lnotab) / 2;
+        p = (unsigned char*)PyBytes_AS_STRING(co->co_lnotab);
+        size = PyBytes_GET_SIZE(co->co_lnotab) / 2;
 
         addr = 0;
         line = co->co_firstlineno;