Pyd: Wrapping too many functions in a class gives a compiler error
Kirk McDonald
kirklin.mcdonald at gmail.com
Fri Jul 6 15:15:56 PDT 2007
BCS wrote:
> it seems that a mixed in template ( mixin foo!(lots.of.stuff) ) only
> generates symbols for the stuff on the inside. These however have access
> to the stuff in the outer templates args list. My dparse.d template uses
> this to side step the symbol length issue with long strings as arguments.
>
> p.s. I haven't actually tested this in detail so I may be looking at
> something else and be totally wrong.
Now /that/ is a useful piece of information. If that big ol' tuple is
never actually used to instantiate a template, things don't blow up.
With a bit of refactoring, I've convinced the following to work:
// note the leading underscore
mixin _wrap_class!(
Foo,
Def!(Foo.bar),
// etc
) F;
extern(C) void PydMain() {
module_init();
F.func(); // calls wrap_class
}
I'll be committing these changes to svn as soon as I verify that my
changes didn't break other things horribly.
--
Kirk McDonald
http://kirkmcdonald.blogspot.com
Pyd: Connecting D and Python
http://pyd.dsource.org
More information about the Digitalmars-d
mailing list