#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. | 77e38d28e608521c7a79decf16bfb3f09b089737
Branch: | Stopgaps:
u/jdemeyer/patch_cython_with_pytypeobject_members|
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Replying to [comment:20 nbruin]:
> Replying to [comment:19 vdelecroix]:
> > 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.
>
> See its use in `extract_*` functions. It's handling `PyObject*` there
and a cast to `object` would generate an INCREF (which is really not what
you want to do in code that's just deleting things). This ticket doesn't
affect that code.
@Nils: then do you think Cython is wrong here?
> > 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`.
>
> So it is now! I don't think it was before.
@Jeroen: could this be done here?
--
Ticket URL: <http://trac.sagemath.org/ticket/18121#comment:25>
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.