Re: C-API proper initialization and deallocation of subclasses

2014-06-13 Thread ptb
While there doesn't appear to be too much interest in this question I thought I would post the solution. I had to modify shoddy by adding the proper flags and clear/traverse methods such to ensure that cyclic garbage collection was properly handled. I'm not quite sure why I had to do this

C-API proper initialization and deallocation of subclasses

2014-06-12 Thread ptb
Hello all, I decided to play around with the C-API and have gotten stuck. I went through the Shoddy example (https://docs.python.org/3/extending/newtypes.html#subclassing-other-types) in the docs and tried to extend it by adding a method which creates and returns a shoddy instance. I dug