Re: Calling an unbound method in C using the Public API

2018-09-05 Thread Matthieu Dartiailh
Thanks Serhiy. This does come with a performance penalty (in particular for function taking keyword arguments) but this is to be expected. Also the PyList_Insert solution does not sadly work for all the methods that I need to wrap. Best Matthieu > On Aug 30, 2018, at 11:09 AM, Serhiy Storchak

Re: Calling an unbound method in C using the Public API

2018-08-30 Thread Serhiy Storchaka
29.08.18 17:33, Matthieu Dartiailh пише: I tried to look at the public C API for a way to call an unbound method with a minimal cost (in term of speed and memory). It seems to me, but please correct me if I am wrong, that one cannot call a MethodDef using only the public API. To use the public

Re: Calling an unbound method in C using the Public API

2018-08-29 Thread Stefan Behnel
Matthieu Dartiailh schrieb am 29.08.2018 um 16:33: > I am one of the maintainer of the atom library > (https://github.com/nucleic/atom ). This > library provides low-memory footprint Python objects, descriptors and > containers enforcing type validation, implemen

Calling an unbound method in C using the Public API

2018-08-29 Thread Matthieu Dartiailh
Hi, I am one of the maintainer of the atom library (https://github.com/nucleic/atom ). This library provides low-memory footprint Python objects, descriptors and containers enforcing type validation, implements the observer pattern. For list, we basically subc