[C++-sig] Boost.Python.function.__signatures__

Ult Mundane ult at mundane.org
Wed Aug 17 23:55:34 CEST 2005


Thanks Dave, I was just looking at this.

I'm using GCC 3.3.5, and it is going through __cxa_demangle 
using type_id.cpp, but __cxa_demangle returns -2, which 
means that it's not a mangled name to begin with.

Googling offers a lot of confusion about what the correct 
behavior is for demangling builtin types. According to this 
post a while back on this list, it works in gcc 3.3 but not 
in gcc 3.4:

http://mail.python.org/pipermail/c++-sig/2004-May/007391.html

To fix it, inside gcc_demangle, I added a switch statement 
to translate single-character types if __cxa_demangle fails. 
This solves the problem. Code snippet attached for anybody 
who's interested. It goes in type_id.cpp inside the 
gcc_demangle function. It's based on the information 
provided here:

http://www.codesourcery.com/cxx-abi/abi.html

Ult

David Abrahams wrote:
> Ult Mundane <ult at mundane.org> writes:
> 
>> 2. Parameters which are built-in C++ types are reported as 
>> single-letter names (e.g., i = int, v = void, b = boolean, x 
>> = long long, j = size_t, etc.). In your example below, it 
>> shows the real C++ type names. I wonder what's different 
>> about my configuration.
> 
> Looks like either Ralf isn't using __cxa_demangle (see
> libs/python/src/converter/type_id.cpp) or your version of GCC is <
> 3.1.
> 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dirty_no_good_demangler.txt
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20050817/6d051442/attachment.txt>


More information about the Cplusplus-sig mailing list