|
From: Rob M. <Rob...@ig...> - 2010-04-04 02:40:39
|
I've found a way to work around it, but I was just wondering if there was a way to get "you_name_it" defined. The fact that there's no reference to it at all means that I can't create a pointer by the name of you_name_it. I worked around it by using the "real" struct name, but it would be nice if the voids didn't just disappear. For example if I have a function call that says: get_you_name_it(you_name_it **yni) I have no way to create a pointer to a pointer to you_name_it because it doesn't exist in the wrapper and therefore isn't defined anywhere. So I ended up writing a wrapper routine that takes a pointer and calls the real function with a pointer to that pointer. And while I'm on the subject, how do I create a pointer to a pointer in Python? I finally figured out that if I have a variable defined I can get a pointer to it by doing: a = variable_name() But how do I get a pointer to a pointer? Or do I always need to write a wrapper routine that uses the simple pointer version (which is what I've been doing)? Thanks, Rob William S Fulton wrote: > Rob Marshall wrote: >> Hi, >> >> In the library I'm trying to interface with (via >> Python) there are several variables that are >> defined as: >> >> typedef void you_name_it; >> >> When I look through the xxx_wrap.c file I don't see any >> SWIGTYPE_p_you_name_it's anywhere. What do I need to do >> in order to get these defined? > SWIG uses the one type in the wrappers and as void and you_name_it are > the same type, it chooses SWIGTYPE_void only - the reduced type. This > should work for all wrappers, so I'm not sure why you want this. > > William > |