On Sat, 2005-09-10 at 16:29 +0000, Dirk Meyer wrote:
> Log Message:
> Somebad hacks to make coding in C a little bit easier. Yes, I know it's
> ugly and a bad hack, I will correct it later.

WOW!  You weren't kidding! :)

Firstly, I'm extremely skeptical about the utility of these kinds of
metaprocessor things.  They're often the source of very annoying and
elusive bugs.  What are you really saving except not having to specify
the PyTypeObject and fill in the methods struct?  I'm hesitant when this
kind of code is filled in implicitly.

Ignoring that, you should be using new-style classes for these types.
(Specify Py_TPFLAGS_BASETYPE).  Also, what if you want the type to
support the GC?  Or support some of the other tp_* fields?  I think
you'll be adding a lot of logic to this metaprocessing code, and I'm not
sure any of it is really worth it.

Cheers,
Jason.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to