diff options
| author | Christian Heimes <christian@cheimes.de> | 2008-05-26 12:29:14 (GMT) | 
|---|---|---|
| committer | Christian Heimes <christian@cheimes.de> | 2008-05-26 12:29:14 (GMT) | 
| commit | 3497f9447633b0a60a0b42ba06f2246805b20bb9 (patch) | |
| tree | adbb433e1bbe57b2fa11c6810eb962b75f663db6 /Python/bltinmodule.c | |
| parent | b4701e638c1030e575adf441aab01ad6319cc83d (diff) | |
| download | cpython-3497f9447633b0a60a0b42ba06f2246805b20bb9.zip cpython-3497f9447633b0a60a0b42ba06f2246805b20bb9.tar.gz cpython-3497f9447633b0a60a0b42ba06f2246805b20bb9.tar.bz2  | |
First step of the C API rename:
renamed Include/bytesobject.h to Include/bytearrayobject.h
renamed Include/stringobject.h to Include/bytesobject.h
added Include/stringobject.h with aliases
Diffstat (limited to 'Python/bltinmodule.c')
| -rw-r--r-- | Python/bltinmodule.c | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 0234b6b..8734822 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -1498,10 +1498,10 @@ builtin_ord(PyObject *self, PyObject* obj)  			ord = (long)((unsigned char)*PyString_AS_STRING(obj));  			return PyInt_FromLong(ord);  		} -	} else if (PyBytes_Check(obj)) { -		size = PyBytes_GET_SIZE(obj); +	} else if (PyByteArray_Check(obj)) { +		size = PyByteArray_GET_SIZE(obj);  		if (size == 1) { -			ord = (long)((unsigned char)*PyBytes_AS_STRING(obj)); +			ord = (long)((unsigned char)*PyByteArray_AS_STRING(obj));  			return PyInt_FromLong(ord);  		} @@ -2618,7 +2618,7 @@ _PyBuiltin_Init(void)  	SETBUILTIN("basestring",	&PyBaseString_Type);  	SETBUILTIN("bool",		&PyBool_Type);  	/*	SETBUILTIN("memoryview",        &PyMemoryView_Type); */ -	SETBUILTIN("bytearray",		&PyBytes_Type); +	SETBUILTIN("bytearray",		&PyByteArray_Type);  	SETBUILTIN("bytes",		&PyString_Type);  	SETBUILTIN("buffer",		&PyBuffer_Type);  	SETBUILTIN("classmethod",	&PyClassMethod_Type);  | 
