Instead of having 2 macros for each object simplify by having 1 set of
macros that can work across all objects except the parsed object. I could
make this work for the parsed object by making the parsed object store
PyObject pointers to the parsed values instead of creating them on the fly
while getting an attribute.
Might as well do some general cleanup too:
Rename the len attribute of a section to length.
The section, import and export callbacks return 0 on success and anything else
on failure.
Whitespace fixes.
Fix a bunch of copy/paste mistakes in the test script.
This means I don't have to store anything in the pepy_parsed object (PyObject
pointers or native C types). Use a macro to get things out of the parsed
structures and into python objects.
There was some weird memory corruption caused by how pepy_parsed_init()
was parsing arguments. The result was that accessing attributes or methods
which didn't exist would periodically cause segfaults. This code was leftover
from an earlier way of doing things and doesn't need to be done this way.
Just parse straight to a C style string instead of this crap.
Also implement support for signature, machine support.
Also, add Py_TPFLAGS_BASETYPE as you should.
Convert the PyObject pointers used inside pepy_parsed into their corresponding
native types and use those. Teach the members array to return them accordingly.
While here might as well add support for signature and machine values.
Also, convert test.py to have shorter output by not using pprint.