mattip committed 8e34817

document where api is still not compatable (help will be appreciated)

Comments (0)

Files changed (2)


             self.func(rffi.cast(rffi.CArrayPtr(rffi.CCHARP), dataps), 
                       rffi.cast(npy_intpp, dims), rffi.cast(npy_intpp, steps), user_data)
-        except:
-            import traceback; traceback.print_exc()
-            raise
             free_raw_storage(dataps, track_allocation=False)
             free_raw_storage(dims, track_allocation=False)
 GenericUfunc = lltype.FuncType([rffi.CArrayPtr(rffi.CCHARP), npy_intpp, npy_intpp,
                                       rffi.VOIDP], lltype.Void)
 gufunctype = lltype.Ptr(GenericUfunc)
+# XXX the signature is wrong, it should be an array of gufunctype, but
+# XXX rffi.CArrayPtr(gufunctype) does not seem to work ???
 @cpython_api([gufunctype, rffi.VOIDP, rffi.CCHARP, Py_ssize_t, Py_ssize_t,
               Py_ssize_t, Py_ssize_t, rffi.CCHARP, rffi.CCHARP, Py_ssize_t,
               rffi.CCHARP], PyObject)
     funcs_w = [None] * ntypes
     dtypes_w = [None] * ntypes * (nin + nout)
     for i in range(ntypes):
+        # XXX this should be 'funcs[i]' not 'funcs'
         funcs_w[i] = W_GenericUFuncCaller(funcs)
     for i in range(ntypes*(nin+nout)):
         dtypes_w[i] = get_dtype_cache(space).dtypes_by_num[ord(types[i])]


                 char types[] = { NPY_DOUBLE,NPY_DOUBLE, NPY_INT, NPY_INT };
                 void *array_data[] = {NULL, NULL};
                 PyObject * retval;
-                /* XXX should be 'funcs', not 'funcs[1]' but how to define an array of function pointers? */
+                /* XXX should be 'funcs', not 'funcs[1]' but how to define an array of 
+                   function pointers in */
                 retval = _PyUFunc_FromFuncAndDataAndSignature(funcs[1],
                                     array_data, types, 2, 1, 1, PyUFunc_None,
                                     "times2", "times2_docstring", 0, "()->()");