|
RE: Next SWIG release: msg#00162programming.swig
At 11:00 AM 1/28/03 +0100, Koester Uwe (TPM/DM) wrote: isn't there anyone else having trouble with the size of the generated files Well, not that I'm not sympathetic (I've run into the problem myself), but the problem is, how is SWIG supposed to know where to sensibly split the thing? Suppose that at the beginning of your interface file you have: %{ #include "foo.h" #include "bar.h" void someFunction(Foo& f) { /* used in the SWIG interface to support some reorganization of the Foo class interface so that it is more Pythonic/Rubyesque/whatever */ ... } SOME_OBSCURE_MACRO(Foo) %} and then you merrily go along declaring a few scores of classes. How do you split that? The two #include directives might be put in each part---that might be redundant but safe. The function definition should be put in one part only, or the linker will complain for the duplicate definition. But the other parts might need the declaration, so the latter should be extracted and duplicated. I suppose it might be done (with quite some effort) but SWIG is not supposed to be that smart. And what about the macro (probably defined in one of the #included files, which SWIG doesn't parse)? Is it defining a function or what? Would it be safe to copy it in each part or not? This defeats all heuristics. Also, if I may be so bold, the sheer size of your wrappers suggests that you consider splitting your module in different sub-modules instead. This is already possible and documented, might be useful for your users too as the logical structure of the module would become clearer, and would effectively solve the 2^16 lines problem. Bye, Luigi _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: Next SWIG release: 00162, Koester Uwe (TPM/DM) |
|---|---|
| Next by Date: | RE: Next SWIG release: 00162, David Beazley |
| Previous by Thread: | RE: Next SWIG releasei: 00162, David Beazley |
| Next by Thread: | RE: Next SWIG release: 00162, Koester Uwe (TPM/DM) |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |