Changes between Version 2 and Version 3 of Ticket #17670


Ignore:
Timestamp:
08/28/17 14:39:24 (4 years ago)
Author:
jdemeyer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #17670 – Description

    v2 v3  
    1 `integer.pyx` and `real_double.pyx` use `hook_tp_functions()` to change `tp_new` and `tp_dealloc` at run-time. With Cython, such hacks are not needed: one can just define `__new__` and `__dealloc__` and things should "just work".
    2 
    3 Since this custom `__new__` and `__dealloc__` are used to implement an object pool, it's better to make a new class to implement such pools.
    4 
    5 Some hackery is still needed because these types also disable garbage collection by changing `tp_flags` and there is no clean Cython interface to do this.
     1`integer.pyx` and `real_double.pyx` use `hook_tp_functions()` to change `tp_new` and `tp_dealloc` at run-time. It seems that one cannot avoid such hacks with the current Cython, but at least we could provide a cleaner interface.