From: Jason E. A. <j.e...@gm...> - 2011-04-03 01:17:52
|
(obviously s/name/sym:name/g in the earlier post, sorry for the typo) Thanks so much for the hints about how to debug. Using those hints, I was able to figure out that I needed to (for some unknown reason) reference the "memberfunctionHandler:sym:name" instead of "sym:name", oddly enough. If this indicates a flaw in the implementation, let me know(!) Thanks! Jason Specifically, Swig_print_node(n) revealed: Inside the function CFFI::functionWrapper(Node *n), in Modules/cffi.cxx, circa line 671 just below "if (CPlusPlus) { emit_defun(n, wname);" line debug: CPlusPlus is true here... Swig_print_node(n) gives: +++ cdecl ---------------------------------------- | tmap:cout - ":int" | feature:export - "1" | name - "rename_me" | ismember - "1" | sym:symtab - 0x6d37b10 | kind - "function" | sym:name - "D_newname" ## this isn't what we want | memberfunctionHandler:sym:name - "newname" ## this is what we want | view - "memberfunctionHandler" | cffi:memberfunction - "1" | memberfunctionHandler:type - "int" | memberfunctionHandler:parms - 0x0 | decl - "f()." | tmap:out - "lresult = result;" | access - "public" | parms - D * | wrap:action - "result = (int)(arg1)->rename_me();" | type - "int" | tmap:ctype - "int" | wrap:name - "_wrap_D_newname" | sym:overname - "__SWIG_0" | memberfunctionHandler:value - 0x0 | memberfunctionHandler:name - "rename_me" | |