Commits

Ronald Oussoren committed 7deae6a

Merged revisions 2580 via svnmerge from
https://svn.red-bean.com/pyobjc/trunk/pyobjc

........
r2580 | ronaldoussoren | 2010-08-15 12:59:08 +0200 (Sun, 15 Aug 2010) | 2 lines

Some small tweaks that improve internal consistency.
........

  • Participants
  • Parent commits d917f06
  • Branches pyobjc-2.3.x

Comments (0)

Files changed (3)

File pyobjc-core/Modules/objc/module.m

 		return NULL;
 	}
 
-#if PY_MAJOR_VERSION == 2
+#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 6
 	return PyBuffer_New(length);
 #else
 	return PyByteArray_FromStringAndSize(NULL, length);

File pyobjc-core/Modules/objc/pyobjc-compat.h

 #if PY_MAJOR_VERSION == 2
 
 #ifndef Py_ARG_BYTES
-#define Py_ARG_BYTES "s"
+#define Py_ARG_BYTES "z"
 #endif
 
 #else

File pyobjc-core/NEWS.txt

 
 An overview of the relevant changes in new, and older, releases.
 
+Version 2.4
+-----------
+
+- ``objc.allocateBuffer`` now returns a bytearray on python >= 2.6,
+  it used to return a buffer object in Python 2.
+
 Version 2.3
 -----------