#18121: Patch Cython with PyTypeObject members
-------------------------------------+-------------------------------------
       Reporter:  jdemeyer           |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.6
      Component:  packages:          |   Resolution:
  standard                           |    Merged in:
       Keywords:  sd66               |    Reviewers:
        Authors:  Jeroen Demeyer     |  Work issues:
Report Upstream:  Fixed upstream,    |       Commit:
  but not in a stable release.       |  a10dcbaaaefb87d48cf337be367cd48f11ed6edf
         Branch:                     |     Stopgaps:
  u/jdemeyer/patch_cython_with_pytypeobject_members|
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by vdelecroix):

 Why `void Py_VISIT(PyObject *o)` is not compatible with Cython? I do not
 quite understand what is this `__pyx_v_visit`. Is it because of Cython
 renaming arguments? If it is so, I do not find it very safe. Though, your
 version of `MonoDict_traverse` looks nicer.

 Could you explain to me the reason of declaring
 {{{
     int PyList_SetItem(object list, Py_ssize_t index, PyObject * item)
 except -1
 }}}
 and not use the `PyList_SetItem` from `cpython.lists` declared as
 `(object,Py_ssize_t,object)`? It would also be cool to add a comment if it
 is important to keep as such.

 In `sage/structure/coerce_dict.pyx`, couldn't you get rid of
 {{{
 cdef extern from "Python.h":
     PyObject* PyWeakref_GetObject(object r)
 }}}
 It is in `cpython.weakref`.

 Do you know why `Py_None` is not available from Cython?

 Could we also remove or comment the `cpdef inline Py_ssize_t
 signed_id(x)`?

--
Ticket URL: <http://trac.sagemath.org/ticket/18121#comment:19>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to