On 10/13/19 2:37 PM, Yuya Nishihara wrote: > On Sun, 13 Oct 2019 14:08:24 +0200, Georges Racinet wrote: >>> +py_capsule_fn!( >>> + from mercurial.cext.parsers import index_get_parents_CAPI >>> + as get_parents_capi >>> + signature ( >>> + index: *mut python_sys::PyObject, >> Here you can directly use RawPyObject: >> >> index: *mut RawPyObject, >> >> see >> https://github.com/dgrunwald/rust-cpython/commit/c5cfd32cf05005e3ad515063c9ca14100362eb93 > Oh, there is. I was looking for cpython::RawPyObject and failed. That's actually how my first attempt looked like IIRC, but Mark preferred it to be enclosed in the capsule submodule to limit that abstraction leak to cases where it's really needed. > > I'll send V2 shortly.
Cool, once it's landed, I'll send the remainders of my own series: removal of `py_set()` in favour of `cpython::objects::PySet`. Regards, -- Georges Racinet https://octobus.net GPG: BF5456F4DC625443849B6E58EE20CA44EF691D39, sur serveurs publics
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel