tag:blogger.com,1999:blog-3971202189709462152.post808802896237239604..comments2024-03-11T12:50:02.036+01:00Comments on PyPy Status Blog: cppyy status updateCarl Friedrich Bolz-Tereickhttp://www.blogger.com/profile/00518922641059511014noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-3971202189709462152.post-54062527880000140582013-02-28T01:34:27.985+01:002013-02-28T01:34:27.985+01:00Right now, there are no PyPy objects exposed as su...Right now, there are no PyPy objects exposed as such, but only PyObjects through cpyext in support of the python C-API. In cppyy, cpyext is used for any interface that has a PyObject* as argument or return value. It is cpyext that takes care of marrying the ref-count API with the garbage collector.<br /><br />Don't pin me down on the details, but from what I understand of cpyext, a wrapper object with the proper C layout is created, and given a life line by putting it in an internal container holding all such objects safe from the gc simply by existing. When the ref count hits zero, the life line gets removed. Object identity is preserved by finding objects in the internal container and reusing them.Wim Lavrijsenhttps://www.blogger.com/profile/07891333377712029026noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-41242213296765698002013-02-28T01:17:06.925+01:002013-02-28T01:17:06.925+01:00How would memory management work for C++ objects w...How would memory management work for C++ objects which own PyPy objects? In CPython, or any similar reference counting system, a C++ class can hold only references via special smart pointers. These smart pointers don't need to be registered in any way with the outer class, since there's no need for a garbage collector to traverse from the outer object to the inner smart pointer instances.<br /><br />For decent garbage collection to work, presumably one needs to be able to enumerate the PyPy objects pointed to by a C++ object. How would this work?Anonymousnoreply@blogger.com