Commits

mattip committed cc28a6c

comment, cleanup

  • Participants
  • Parent commits 410f35e
  • Branches pypy-pyarray

Comments (0)

Files changed (3)

 
 - 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__()

pypy/module/cpyext/src/modsupport.c

 
 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:

pypy/module/cpyext/test/test_number.py

         ppf = lltype.malloc(PyObjectP.TO, 1, flavor='raw')
         ppl[0] = pl
         ppf[0] = pf
-        
+
         ret = api.PyNumber_CoerceEx(ppl, ppf)
         assert ret == 0
 
         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")))