|
Re: bug while wrapping const char arrays without an explicitly defined size: msg#00173programming.swig
David Beazley wrote: Marcelo Matus writes: probably the very large strings could have special typemaps, but the checking of NULL should be there since is not uncommon to pass or return a NULL value for char*. In fact, the NULL check is in the 1.3.21, but is inside the typemaps, in some cases, in other cases the check was missing. The other thing I forgot, if you get a swig pointer, like _012234_p_char that you create using carrays (or other form), then in void test_case(char * in); the old 1.3.21 passes you the string "_012234_p_char", and not the pointer 0x01234. all these little differences or features of C++/python/swig can be added to the typemaps, or in the SWIG_XXX methods. I like the later better since the code generated is shorter and more consistent (you are sure the same checks are performed in the in,out,varin,directorout,... typemaps where you use the SWIG_XXX methods). Marcelo PS: Anyway, the reported problem was not related to the SWIG_XXX methods, but to the fact that I added the 'char [ANY]' forms, but I forgot to add the 'char []' form to the typemaps. -- Dave _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: bug while wrapping const char arrays without an explicitly defined size: 00173, Marcelo Matus |
|---|---|
| Next by Date: | Perl typemaps for byte arrays: 00173, Henri Asseily |
| Previous by Thread: | Re: bug while wrapping const char arrays without an explicitly defined sizei: 00173, David Beazley |
| Next by Thread: | Perl typemaps for byte arrays: 00173, Henri Asseily |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |