[PATCH 01 of 10] rust-cpython: move py_shared_state to PySharedRefCell object

Raphaël Gomès raphael.gomes at octobus.net
Fri Oct 11 09:24:57 EDT 2019


Just for the record, "the series" means patches 1-8, as 9 and 10 are unsafe.

On 10/11/19 3:13 PM, Pulkit Goyal wrote:
> On Sun, Sep 22, 2019 at 9:51 AM Yuya Nishihara <yuya at tcha.org> wrote:
>> # HG changeset patch
>> # User Yuya Nishihara <yuya at tcha.org>
>> # Date 1568469711 -32400
>> #      Sat Sep 14 23:01:51 2019 +0900
>> # Node ID e7f643679476b013e86b9a2b75f704d64eec4293
>> # Parent  7a01778bc7b717ae12ae6b73e9047a4d06eeba61
>> rust-cpython: move py_shared_state to PySharedRefCell object
>>
>> The goal of this series is to encapsulate more "py_shared" thingy and
>> reduce the size of the macro, which is hard to debug.
>>
>> Since py_shared_state manages the borrowing state of the object owned by
>> PySharedRefCell, this change makes more sense. If a PyObject has more than
>> one data to be leaked into Python world, each PySharedState should incref
>> the parent PyObject, and keep track of the corresponding borrowing state.
> Queued the series as per Raphaël review. Many thanks!
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list