[pypy-commit] pypy pypy-pyarray: comment, cleanup

mattip noreply at buildbot.pypy.org
Mon Sep 16 21:13:51 CEST 2013


Author: Matti Picus <matti.picus at gmail.com>
Branch: pypy-pyarray
Changeset: r66968:cc28a6c9e089
Date: 2013-09-13 00:10 +0300
http://bitbucket.org/pypy/pypy/changeset/cc28a6c9e089/

Log:	comment, cleanup

diff --git a/TODO.txt b/TODO.txt
--- a/TODO.txt
+++ b/TODO.txt
@@ -9,13 +9,11 @@
 
 - test "from numpypy import *" esp. get_include()
 - test all *.h files under pypy/module/cpyext/include/numpy
-- make sure all cpyext changes are tested:
-    PyComplexFromCComplex() (changed, problematic for c++?)
-    _PyPackageContext (new)
+- make sure meaningful cpyext changes are tested:
     all ndarrayobject.c
     copy_header_files() in api.py (changed)
     all ndarrayobject.py (new)
-    PyNumberCoerceEx() (new)
-    PyNumberCoerce() (new)
+    PyNumber_CoerceEx() (new)
+    PyNumber_Coerce() (new)
 - test, implement use of __array_prepare__()
 - test, implement use of __array_wrap__()
diff --git a/pypy/module/cpyext/src/modsupport.c b/pypy/module/cpyext/src/modsupport.c
--- a/pypy/module/cpyext/src/modsupport.c
+++ b/pypy/module/cpyext/src/modsupport.c
@@ -8,7 +8,9 @@
 
 static PyObject *va_build_value(const char *, va_list, int);
 
-/* Package context -- the full module name for package imports */
+/* Package context -- the full module name for package imports
+ * Should this be modified in  _Py_InitPyPyModule for CPython
+ * compatibility  (see CPython's Py_InitModule4)? */
 char *_Py_PackageContext = NULL;
 
 /* Py_InitModule4() parameters:
diff --git a/pypy/module/cpyext/test/test_number.py b/pypy/module/cpyext/test/test_number.py
--- a/pypy/module/cpyext/test/test_number.py
+++ b/pypy/module/cpyext/test/test_number.py
@@ -43,7 +43,7 @@
         ppf = lltype.malloc(PyObjectP.TO, 1, flavor='raw')
         ppl[0] = pl
         ppf[0] = pf
-        
+
         ret = api.PyNumber_CoerceEx(ppl, ppf)
         assert ret == 0
 
@@ -55,7 +55,7 @@
         Py_DecRef(space, ppf[0])
         lltype.free(ppl, flavor='raw')
         lltype.free(ppf, flavor='raw')
-       
+
     def test_numbermethods(self, space, api):
         assert "ab" == space.unwrap(
             api.PyNumber_Add(space.wrap("a"), space.wrap("b")))


More information about the pypy-commit mailing list