From: SourceForge.net <no...@so...> - 2006-10-27 23:51:10
|
Bugs item #1585688, was opened at 2006-10-27 11:11 Message generated for change (Comment added) made by olly You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=1585688&group_id=1645 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: perl Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Petr Novotny (petr_novotny) >Assigned to: Olly Betts (olly) Summary: Uncompilable dispatch method with %typemap(in) Initial Comment: The attached bug.i file, swigged with -c++ -perl5, creates an uncompilable code. The %typemap(in) has a subtle typo - there's "numinput=0" instead of "numinputs=0". The generated dispatch function for the overload cases contains int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_p_char, 0); It accesses ST(0), ST(1) and ST(2) correctly. Then it tries to check the fourth parameter (why oh why?) and gets somewhat confused about it - and it uses non- existent variable "argv"... I expect Swig either complain about syntactically incorrect typemap specification, or to generate a code that compiles. Tested with swig 1.3.29. ---------------------------------------------------------------------- >Comment By: Olly Betts (olly) Date: 2006-10-28 00:51 Message: Logged In: YES user_id=14972 Thanks for your bug report. I believe I recently fixed the "argv" problem in CVS HEAD - the generated code I get with your example doesn't reference argv with CVS HEAD. The reason that 4 parameters appear to be checked is that ST(0) is actually the "this" pointer to the object itself - if you look carefully at the code, it is expected to be a "pointer to B". ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=1585688&group_id=1645 |