From: Jason E. A. <j.e...@gm...> - 2011-04-02 21:35:18
|
On Sat, Apr 2, 2011 at 3:59 PM, Jason E. Aten <j.e...@gm...> wrote: > On Sat, Apr 2, 2011 at 3:32 PM, William S Fulton <ws...@fu...>wrote: > "sym:name" contains the renamed symbol and "name" contains the real symbol > name. You can work out these attributes usually by debugging using the > debugging options such as -debug-module or judicious use of Swig_print on > any node. See the development documentation Doc/Devel. > > Hmm... yes, I tried "name". But when I get "name" with the following code, > I get the name "before I've been renamed". I actually need the renamed > name, "newname" but rather than with the class prefix "D_newname", I need > just "newname" without a class; in the example. > > e.g. at cffi.cxx , at the end of CFFI::emit_defmethod(), if I say: > > Printf(f_clos, "(cl:defmethod %s (%s)\n > (%s%s))\n\n", > > lispify_name(n, Getattr(n, "name"), "'function"), > args_placeholder, > > lispify_name(n, Getattr(n, "sym:name"), "'function"), > args_call); > > > > // this gives (note that rename_me is still there) > > (cl:defmethod rename_me ((self > d)) > > (D_newname (ff-pointer > self))) > > Hmmm.... well, I put a trace on all the hash table entries as swig runs, and indeed the only key:value pair that ever shows up with value "newname" indeed has value "name", so I must be asking for the "name" attribute from the wrong place. So, errrr...I'm still stuck. All help appreciated! Thanks! Jason |