[pygccxml-commit] SF.net SVN: pygccxml:[1785] pyplusplus_dev
Brought to you by:
mbaas,
roman_yakovenko
|
From: <rom...@us...> - 2009-12-26 20:13:20
|
Revision: 1785
http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1785&view=rev
Author: roman_yakovenko
Date: 2009-12-26 20:13:12 +0000 (Sat, 26 Dec 2009)
Log Message:
-----------
ctypes code generator created wrong code for callback functions - this commit fixes the issue and introduces the tester
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/code_creators/ctypes_formatter.py
pyplusplus_dev/unittests/ctypes_tester.py
pyplusplus_dev/unittests/sconstruct
Added Paths:
-----------
pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/
pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/binaries/
pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/binaries/ctypes_utils.py
pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/binaries/exposed_decl.pypp.txt
pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/binaries/function_ptr_as_variable.os
pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/binaries/function_ptr_as_variable.py
pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/function_ptr_as_variable.cpp
pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/function_ptr_as_variable.h
pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/sconscript
Modified: pyplusplus_dev/pyplusplus/code_creators/ctypes_formatter.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/ctypes_formatter.py 2009-12-26 19:21:49 UTC (rev 1784)
+++ pyplusplus_dev/pyplusplus/code_creators/ctypes_formatter.py 2009-12-26 20:13:12 UTC (rev 1785)
@@ -93,7 +93,10 @@
else:
base_visitor = type_converter_t( self.user_type.base, self.decl_formatter )
internal_type_str = declarations.apply_visitor( base_visitor, base_visitor.user_type )
- return "ctypes.POINTER( %s )" % internal_type_str
+ if declarations.is_calldef_pointer( self.user_type ):
+ return internal_type_str
+ else:
+ return "ctypes.POINTER( %s )" % internal_type_str
def visit_reference( self ):
no_ref = declarations.remove_const( declarations.remove_reference( self.user_type ) )
Modified: pyplusplus_dev/unittests/ctypes_tester.py
===================================================================
--- pyplusplus_dev/unittests/ctypes_tester.py 2009-12-26 19:21:49 UTC (rev 1784)
+++ pyplusplus_dev/unittests/ctypes_tester.py 2009-12-26 20:13:12 UTC (rev 1785)
@@ -171,6 +171,22 @@
self.failUnless( self.module_ref.get_value_data_p() == 34 )
+class function_ptr_as_variable_tester_t( ctypes_base_tester_t ):
+ def __init__( self, *args, **keywd ):
+ ctypes_base_tester_t.__init__( self, 'function_ptr_as_variable', *args, **keywd )
+
+ def customize( self, mb ):
+ mb.global_ns.typedef('do_smth_fun_t').include()
+
+ @staticmethod
+ def identity(v):
+ return v
+
+ def test(self):
+ info = self.module_ref.info()
+ info.do_smth_fun = self.module_ref.do_smth_fun_t(self.identity)
+ self.failUnless( 21 == self.module_ref.execute_callback( info, 21 ) )
+
class varargs_tester_t( ctypes_base_tester_t ):
def __init__( self, *args, **keywd ):
ctypes_base_tester_t.__init__( self, 'varargs', *args, **keywd )
@@ -206,6 +222,7 @@
suite.addTest( unittest.makeSuite(variables_tester_t))
suite.addTest( unittest.makeSuite(varargs_tester_t))
suite.addTest( unittest.makeSuite(circular_references_tester_t))
+ suite.addTest( unittest.makeSuite(function_ptr_as_variable_tester_t))
return suite
def run_suite():
Added: pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/binaries/ctypes_utils.py
===================================================================
--- pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/binaries/ctypes_utils.py (rev 0)
+++ pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/binaries/ctypes_utils.py 2009-12-26 20:13:12 UTC (rev 1785)
@@ -0,0 +1,135 @@
+# This file has been generated by Py++.
+
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import os
+import ctypes
+
+# what is the best way to treat overloaded constructors
+class native_callable( object ):
+ def __init__(self, dll, name, restype=None, argtypes=None ):
+ self.name = name
+ self.func = getattr( dll, dll.undecorated_names[name] )
+ self.func.restype = restype
+ self.func.argtypes = argtypes
+
+ def __call__(self, *args, **keywd ):
+ return self.func( *args, **keywd )
+
+class native_overloaded_callable( object ):
+ def __init__(self, functions ):
+ self.__functions = functions
+
+ def __call__( self, *args ):
+ types = None
+ if args:
+ types = tuple(arg.__class__ for arg in args)
+ f = self.__functions.get(types)
+ if f is None:
+ msg = ['Unable to find a function that match the arguments you passed.']
+ msg.append( 'First argument type is "this" type.' )
+ msg.append( 'This function call argument types: ' + str( types ) )
+ msg.append( 'Registered methods argument types: ' )
+ for key in self.__functions.iterkeys():
+ msg.append(' ' + str(key))
+ raise TypeError(os.linesep.join(msg))
+ else:
+ return f(*args)
+
+class multi_method_registry_t:
+ def __init__( self, factory, restype ):
+ self.factory = factory
+ self.restype = restype
+ self.__functions = {}
+
+ def register( self, callable_or_name, argtypes=None ):
+ if isinstance( callable_or_name, native_callable ):
+ callable = callable_or_name
+ else:
+ name = callable_or_name
+ callable = self.factory( name, restype=self.restype, argtypes=argtypes )
+ self.__functions[ tuple(callable.func.argtypes) ] = callable.func
+ return self
+
+ def finalize(self):
+ return native_overloaded_callable( self.__functions )
+
+
+class mem_fun_factory( object ):
+ def __init__( self, dll, wrapper, class_name, namespace='' ):
+ self.dll = dll
+ self.namespace = namespace
+ self.class_name = class_name
+ self.this_type = ctypes.POINTER( wrapper )
+
+ def __call__( self, name, **keywd ):
+ if 'argtypes' not in keywd or keywd['argtypes'] is None:
+ keywd['argtypes'] = [ self.this_type ]
+ else:
+ keywd['argtypes'].insert( 0, self.this_type )
+ return native_callable( self.dll, name, **keywd )
+
+ def __get_ns_name(self):
+ if self.namespace:
+ return self.namespace + '::'
+ else:
+ return ''
+
+ def default_constructor( self ):
+ return self( '%(ns)s%(class_name)s::%(class_name)s(void)'
+ % dict( ns=self.__get_ns_name()
+ , class_name=self.class_name ) )
+
+ def constructor( self, argtypes_str, **keywd ):
+ return self( '%(ns)s%(class_name)s::%(class_name)s(%(args)s)'
+ % dict( ns=self.__get_ns_name()
+ , class_name=self.class_name
+ , args=argtypes_str )
+ , **keywd )
+
+ def copy_constructor( self ):
+ return self( '%(ns)s%(class_name)s::%(class_name)s(%(ns)s%(class_name)s const &)'
+ % dict( ns=self.__get_ns_name()
+ , class_name=self.class_name )
+ , argtypes=[self.this_type] )
+
+ def destructor( self, is_virtual=False ):
+ virtuality = ''
+ if is_virtual:
+ virtuality = 'virtual '
+ return self( '%(virtuality)s%(ns)s%(class_name)s::~%(class_name)s(void)'
+ % dict( ns=self.__get_ns_name()
+ , virtuality=virtuality
+ , class_name=self.class_name ) )
+
+ def operator_assign( self ):
+ return self( '%(ns)s%(class_name)s & %(class_name)s::operator=(%(class_name)s const &)'
+ % dict( ns=self.__get_ns_name()
+ , class_name=self.class_name )
+ , restype=self.this_type
+ , argtypes=[self.this_type] )
+
+ def method( self, name, restype_str=None, argtypes_str=None, **keywd ):
+ if None is restype_str:
+ restype_str = 'void'
+ if None is argtypes_str:
+ argtypes_str = 'void'
+
+ return self( '%(return_)s %(ns)s%(class_name)s::%(method_name)s(%(args)s)'
+ % dict( return_=restype_str
+ , ns=self.__get_ns_name()
+ , class_name=self.class_name
+ , method_name=name
+ , args=argtypes_str )
+ , **keywd )
+
+ def multi_method( self, restype=None ):
+ return multi_method_registry_t( self, restype )
+
+
+#take a look on http://code.activestate.com/recipes/413486/
+Enumeration = ctypes.c_int
+
Added: pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/binaries/exposed_decl.pypp.txt
===================================================================
--- pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/binaries/exposed_decl.pypp.txt (rev 0)
+++ pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/binaries/exposed_decl.pypp.txt 2009-12-26 20:13:12 UTC (rev 1785)
@@ -0,0 +1,429 @@
++@destructor_t@~info@ ( ::info::* )( ) ( ::info::* )( )
+~@destructor_t@~_IO_marker@ ( ::_IO_marker::* )( ) ( ::_IO_marker::* )( )
+~@destructor_t@~_IO_FILE@ ( ::_IO_FILE::* )( ) ( ::_IO_FILE::* )( )
+~@destructor_t@~._5@ ( ::_IO_cookie_io_functions_t::* )( ) ( ::_IO_cookie_io_functions_t::* )( )
+~@destructor_t@~._4@ ( ::_G_fpos64_t::* )( ) ( ::_G_fpos64_t::* )( )
+~@destructor_t@~._1@ ( ::__mbstate_t::* )( ) ( ::__mbstate_t::* )( )
+~@destructor_t@~._0@ ( ::__fsid_t::* )( ) ( ::__fsid_t::* )( )
+~@destructor_t@~._3@ ( ::_G_fpos_t::* )( ) ( ::_G_fpos_t::* )( )
+~@destructor_t@~._2@ ( ::__mbstate_t::* )( ) ( ::__mbstate_t::* )( )
+~@enumeration_t@__codecvt_result@::__codecvt_result
+~@typedef_t@__uint16_t@::__uint16_t
+~@typedef_t@cookie_close_function_t@::cookie_close_function_t
+~@typedef_t@__uint64_t@::__uint64_t
+~@typedef_t@__int16_t@::__int16_t
+~@typedef_t@__ssize_t@::__ssize_t
+~@typedef_t@__io_close_fn@::__io_close_fn
+~@typedef_t@__mode_t@::__mode_t
+~@typedef_t@__off64_t@::__off64_t
+~@typedef_t@__u_char@::__u_char
+~@typedef_t@_G_uint32_t@::_G_uint32_t
+~@typedef_t@size_t@::size_t
+~@typedef_t@__blksize_t@::__blksize_t
+~@typedef_t@__u_long@::__u_long
+~@typedef_t@__swblk_t@::__swblk_t
+~@typedef_t@FILE@::FILE
+~@typedef_t@__off_t@::__off_t
+~@typedef_t@__fsblkcnt_t@::__fsblkcnt_t
+~@typedef_t@__rlim_t@::__rlim_t
+~@typedef_t@__fsfilcnt_t@::__fsfilcnt_t
+~@typedef_t@__id_t@::__id_t
+~@typedef_t@cookie_io_functions_t@::cookie_io_functions_t
+~@typedef_t@__gid_t@::__gid_t
+~@typedef_t@__clockid_t@::__clockid_t
+~@typedef_t@__uint32_t@::__uint32_t
+~@typedef_t@__useconds_t@::__useconds_t
+~@typedef_t@__uint8_t@::__uint8_t
+~@typedef_t@fpos_t@::fpos_t
++@typedef_t@do_smth_fun_t@::do_smth_fun_t
+~@typedef_t@__io_read_fn@::__io_read_fn
+~@typedef_t@__int32_t@::__int32_t
+~@typedef_t@__daddr_t@::__daddr_t
+~@typedef_t@__u_quad_t@::__u_quad_t
+~@typedef_t@__u_short@::__u_short
+~@typedef_t@__ino64_t@::__ino64_t
+~@typedef_t@_G_int16_t@::_G_int16_t
+~@typedef_t@va_list@::va_list
+~@typedef_t@__loff_t@::__loff_t
+~@typedef_t@__pid_t@::__pid_t
+~@typedef_t@__FILE@::__FILE
+~@typedef_t@__int64_t@::__int64_t
+~@typedef_t@__io_seek_fn@::__io_seek_fn
+~@typedef_t@__io_write_fn@::__io_write_fn
+~@typedef_t@_G_uint16_t@::_G_uint16_t
+~@typedef_t@__fsblkcnt64_t@::__fsblkcnt64_t
+~@typedef_t@cookie_seek_function_t@::cookie_seek_function_t
+~@typedef_t@__nlink_t@::__nlink_t
+~@typedef_t@fpos64_t@::fpos64_t
+~@typedef_t@__ino_t@::__ino_t
+~@typedef_t@__dev_t@::__dev_t
+~@typedef_t@cookie_write_function_t@::cookie_write_function_t
+~@typedef_t@_IO_lock_t@::_IO_lock_t
+~@typedef_t@__intptr_t@::__intptr_t
+~@typedef_t@__time_t@::__time_t
+~@typedef_t@__qaddr_t@::__qaddr_t
+~@typedef_t@__caddr_t@::__caddr_t
+~@typedef_t@__suseconds_t@::__suseconds_t
+~@typedef_t@__clock_t@::__clock_t
+~@typedef_t@__socklen_t@::__socklen_t
+~@typedef_t@__u_int@::__u_int
+~@typedef_t@__blkcnt_t@::__blkcnt_t
+~@typedef_t@__fsfilcnt64_t@::__fsfilcnt64_t
+~@typedef_t@__quad_t@::__quad_t
+~@typedef_t@__blkcnt64_t@::__blkcnt64_t
+~@typedef_t@__key_t@::__key_t
+~@typedef_t@cookie_read_function_t@::cookie_read_function_t
+~@typedef_t@_G_int32_t@::_G_int32_t
+~@typedef_t@__gnuc_va_list@::__gnuc_va_list
+~@typedef_t@__uid_t@::__uid_t
+~@typedef_t@__rlim64_t@::__rlim64_t
+~@typedef_t@__int8_t@::__int8_t
+~@typedef_t@__timer_t@::__timer_t
+~@namespace_t@std@::std
+~@namespace_t@__cxxabiv1@::__cxxabiv1
+~@class_declaration_t@_IO_jump_t@::_IO_jump_t
+~@class_declaration_t@obstack@::obstack
+~@class_declaration_t@_IO_FILE_plus@::_IO_FILE_plus
+~@class_declaration_t@_IO_cookie_file@::_IO_cookie_file
+~@variable_t@_flags2@::_IO_FILE::_flags2
+~@variable_t@_vtable_offset@::_IO_FILE::_vtable_offset
+~@variable_t@stdout@::stdout
+~@variable_t@_IO_read_end@::_IO_FILE::_IO_read_end
+~@variable_t@_unused2@::_IO_FILE::_unused2
+~@variable_t@_old_offset@::_IO_FILE::_old_offset
+~@variable_t@_pos@::_IO_marker::_pos
+~@variable_t@_IO_buf_end@::_IO_FILE::_IO_buf_end
+~@variable_t@__pos@::_G_fpos_t::__pos
+~@variable_t@__pos@::_G_fpos64_t::__pos
+~@variable_t@_next@::_IO_marker::_next
+~@variable_t@_mode@::_IO_FILE::_mode
+~@variable_t@sys_nerr@::sys_nerr
+~@variable_t@close@::_IO_cookie_io_functions_t::close
+~@variable_t@_IO_save_base@::_IO_FILE::_IO_save_base
+~@variable_t@_IO_read_base@::_IO_FILE::_IO_read_base
+~@variable_t@seek@::_IO_cookie_io_functions_t::seek
+~@variable_t@__state@::_G_fpos_t::__state
+~@variable_t@__state@::_G_fpos64_t::__state
+~@variable_t@sys_errlist@::sys_errlist
+~@variable_t@_lock@::_IO_FILE::_lock
+~@variable_t@_shortbuf@::_IO_FILE::_shortbuf
+~@variable_t@_IO_2_1_stdin_@::_IO_2_1_stdin_
+~@variable_t@_sys_errlist@::_sys_errlist
+~@variable_t@_IO_backup_base@::_IO_FILE::_IO_backup_base
+~@variable_t@_chain@::_IO_FILE::_chain
+~@variable_t@_IO_write_ptr@::_IO_FILE::_IO_write_ptr
+~@variable_t@write@::_IO_cookie_io_functions_t::write
+~@variable_t@_sys_nerr@::_sys_nerr
++@variable_t@do_smth_fun@::info::do_smth_fun
+~@variable_t@_fileno@::_IO_FILE::_fileno
+~@variable_t@__pad5@::_IO_FILE::__pad5
+~@variable_t@_flags@::_IO_FILE::_flags
+~@variable_t@__wch@::__mbstate_t::__wch
+~@variable_t@__pad4@::_IO_FILE::__pad4
+~@variable_t@_sbuf@::_IO_marker::_sbuf
+~@variable_t@read@::_IO_cookie_io_functions_t::read
+~@variable_t@__wchb@::__mbstate_t::__wchb
+~@variable_t@_IO_write_end@::_IO_FILE::_IO_write_end
+~@variable_t@_IO_2_1_stderr_@::_IO_2_1_stderr_
+~@variable_t@_IO_2_1_stdout_@::_IO_2_1_stdout_
+~@variable_t@__val@::__fsid_t::__val
+~@variable_t@_cur_column@::_IO_FILE::_cur_column
+~@variable_t@__count@::__mbstate_t::__count
+~@variable_t@_IO_write_base@::_IO_FILE::_IO_write_base
+~@variable_t@_IO_save_end@::_IO_FILE::_IO_save_end
+~@variable_t@__pad1@::_IO_FILE::__pad1
+~@variable_t@_offset@::_IO_FILE::_offset
+~@variable_t@__pad3@::_IO_FILE::__pad3
+~@variable_t@__pad2@::_IO_FILE::__pad2
+~@variable_t@_markers@::_IO_FILE::_markers
+~@variable_t@_IO_read_ptr@::_IO_FILE::_IO_read_ptr
+~@variable_t@stderr@::stderr
+~@variable_t@__value@::__mbstate_t::__value
+~@variable_t@stdin@::stdin
+~@variable_t@_IO_buf_base@::_IO_FILE::_IO_buf_base
++@class_t@info@::info
+~@class_t@__mbstate_t@::__mbstate_t
+~@class_t@_G_fpos64_t@::_G_fpos64_t
+~@class_t@_IO_cookie_io_functions_t@::_IO_cookie_io_functions_t
+~@class_t@_IO_marker@::_IO_marker
+~@class_t@_IO_FILE@::_IO_FILE
+~@class_t@__fsid_t@::__fsid_t
+~@class_t@('/usr/include/wchar.h', 87)@::__mbstate_t
+~@class_t@_G_fpos_t@::_G_fpos_t
++@constructor_t@info@ ( ::info::* )( ::info const & ) ( ::info::* )( ::info const & )
++@constructor_t@info@ ( ::info::* )( ) ( ::info::* )( )
+~@constructor_t@__mbstate_t@ ( ::__mbstate_t::* )( ::__mbstate_t const & ) ( ::__mbstate_t::* )( ::__mbstate_t const & )
+~@constructor_t@__mbstate_t@ ( ::__mbstate_t::* )( ) ( ::__mbstate_t::* )( )
+~@constructor_t@_G_fpos64_t@ ( ::_G_fpos64_t::* )( ::_G_fpos64_t const & ) ( ::_G_fpos64_t::* )( ::_G_fpos64_t const & )
+~@constructor_t@_G_fpos64_t@ ( ::_G_fpos64_t::* )( ) ( ::_G_fpos64_t::* )( )
+~@constructor_t@_IO_cookie_io_functions_t@ ( ::_IO_cookie_io_functions_t::* )( ::_IO_cookie_io_functions_t const & ) ( ::_IO_cookie_io_functions_t::* )( ::_IO_cookie_io_functions_t const & )
+~@constructor_t@_IO_cookie_io_functions_t@ ( ::_IO_cookie_io_functions_t::* )( ) ( ::_IO_cookie_io_functions_t::* )( )
+~@constructor_t@_IO_marker@ ( ::_IO_marker::* )( ::_IO_marker const & ) ( ::_IO_marker::* )( ::_IO_marker const & )
+~@constructor_t@_IO_marker@ ( ::_IO_marker::* )( ) ( ::_IO_marker::* )( )
+~@constructor_t@_IO_FILE@ ( ::_IO_FILE::* )( ::_IO_FILE const & ) ( ::_IO_FILE::* )( ::_IO_FILE const & )
+~@constructor_t@_IO_FILE@ ( ::_IO_FILE::* )( ) ( ::_IO_FILE::* )( )
+~@constructor_t@__fsid_t@ ( ::__fsid_t::* )( ::__fsid_t const & ) ( ::__fsid_t::* )( ::__fsid_t const & )
+~@constructor_t@__fsid_t@ ( ::__fsid_t::* )( ) ( ::__fsid_t::* )( )
+~@constructor_t@('/usr/include/wchar.h', 87)@ ( ::__mbstate_t::* )( ::__mbstate_t const & ) ( ::__mbstate_t::* )( ::__mbstate_t const & )
+~@constructor_t@('/usr/include/wchar.h', 87)@ ( ::__mbstate_t::* )( ) ( ::__mbstate_t::* )( )
+~@constructor_t@_G_fpos_t@ ( ::_G_fpos_t::* )( ::_G_fpos_t const & ) ( ::_G_fpos_t::* )( ::_G_fpos_t const & )
+~@constructor_t@_G_fpos_t@ ( ::_G_fpos_t::* )( ) ( ::_G_fpos_t::* )( )
+~@member_operator_t@operator=@::_IO_cookie_io_functions_t & ( ::_IO_cookie_io_functions_t::* )( ::_IO_cookie_io_functions_t const & ) ::_IO_cookie_io_functions_t & ( ::_IO_cookie_io_functions_t::* )( ::_IO_cookie_io_functions_t const & )
+~@member_operator_t@operator=@::_IO_FILE & ( ::_IO_FILE::* )( ::_IO_FILE const & ) ::_IO_FILE & ( ::_IO_FILE::* )( ::_IO_FILE const & )
+~@member_operator_t@operator=@::_G_fpos_t & ( ::_G_fpos_t::* )( ::_G_fpos_t const & ) ::_G_fpos_t & ( ::_G_fpos_t::* )( ::_G_fpos_t const & )
++@member_operator_t@operator=@::info & ( ::info::* )( ::info const & ) ::info & ( ::info::* )( ::info const & )
+~@member_operator_t@operator=@::_G_fpos64_t & ( ::_G_fpos64_t::* )( ::_G_fpos64_t const & ) ::_G_fpos64_t & ( ::_G_fpos64_t::* )( ::_G_fpos64_t const & )
+~@member_operator_t@operator=@::__mbstate_t & ( ::__mbstate_t::* )( ::__mbstate_t const & ) ::__mbstate_t & ( ::__mbstate_t::* )( ::__mbstate_t const & )
+~@member_operator_t@operator=@::__mbstate_t & ( ::__mbstate_t::* )( ::__mbstate_t const & ) ::__mbstate_t & ( ::__mbstate_t::* )( ::__mbstate_t const & )
+~@member_operator_t@operator=@::__fsid_t & ( ::__fsid_t::* )( ::__fsid_t const & ) ::__fsid_t & ( ::__fsid_t::* )( ::__fsid_t const & )
+~@member_operator_t@operator=@::_IO_marker & ( ::_IO_marker::* )( ::_IO_marker const & ) ::_IO_marker & ( ::_IO_marker::* )( ::_IO_marker const & )
+~@free_function_t@__builtin_ldexpf@float (*)( float,int )float (*)( float,int )
+~@free_function_t@obstack_vprintf@int (*)( __restrict__ ::obstack *,__restrict__ char const *,::__gnuc_va_list )int (*)( __restrict__ ::obstack *,__restrict__ char const *,::__gnuc_va_list )
+~@free_function_t@__builtin_tanhf@float (*)( float )float (*)( float )
+~@free_function_t@__builtin_ldexpl@long double (*)( long double,int )long double (*)( long double,int )
+~@free_function_t@_IO_putc@int (*)( int,::_IO_FILE * )int (*)( int,::_IO_FILE * )
+~@free_function_t@__builtin_inf@double (*)( )double (*)( )
+~@free_function_t@__builtin_prefetch@void (*)( void const *,... )void (*)( void const *,... )
+~@free_function_t@__builtin_popcount@int (*)( int )int (*)( int )
+~@free_function_t@__builtin_expf@float (*)( float )float (*)( float )
+~@free_function_t@__builtin_islessgreater@bool (*)( ... )bool (*)( ... )
+~@free_function_t@fseeko64@int (*)( ::FILE *,::__off64_t,int )int (*)( ::FILE *,::__off64_t,int )
+~@free_function_t@__builtin_cargf@float (*)( complex float )float (*)( complex float )
+~@free_function_t@__builtin_cpowl@complex long double (*)( complex long double,complex long double )complex long double (*)( complex long double,complex long double )
+~@free_function_t@fflush@int (*)( ::FILE * )int (*)( ::FILE * )
+~@free_function_t@__builtin_expl@long double (*)( long double )long double (*)( long double )
+~@free_function_t@fputc@int (*)( int,::FILE * )int (*)( int,::FILE * )
+~@free_function_t@__underflow@int (*)( ::_IO_FILE * )int (*)( ::_IO_FILE * )
+~@free_function_t@fwrite@::size_t (*)( __restrict__ void const *,::size_t,::size_t,__restrict__ ::FILE * )::size_t (*)( __restrict__ void const *,::size_t,::size_t,__restrict__ ::FILE * )
+~@free_function_t@fflush_unlocked@int (*)( ::FILE * )int (*)( ::FILE * )
+~@free_function_t@__builtin_log10@double (*)( double )double (*)( double )
+~@free_function_t@_IO_cookie_init@void (*)( ::_IO_cookie_file *,int,void *,::_IO_cookie_io_functions_t )void (*)( ::_IO_cookie_file *,int,void *,::_IO_cookie_io_functions_t )
+~@free_function_t@fputs@int (*)( __restrict__ char const *,__restrict__ ::FILE * )int (*)( __restrict__ char const *,__restrict__ ::FILE * )
+~@free_function_t@__builtin_exp@double (*)( double )double (*)( double )
+~@free_function_t@tmpnam@char * (*)( char * )char * (*)( char * )
+~@free_function_t@feof_unlocked@int (*)( ::FILE * )int (*)( ::FILE * )
+~@free_function_t@__builtin_popcountll@int (*)( long long int )int (*)( long long int )
+~@free_function_t@getline@::__ssize_t (*)( __restrict__ char * *,__restrict__ ::size_t *,__restrict__ ::FILE * )::__ssize_t (*)( __restrict__ char * *,__restrict__ ::size_t *,__restrict__ ::FILE * )
+~@free_function_t@_IO_padn@::__ssize_t (*)( ::_IO_FILE *,int,::__ssize_t )::__ssize_t (*)( ::_IO_FILE *,int,::__ssize_t )
+~@free_function_t@__builtin_csinh@complex double (*)( complex double )complex double (*)( complex double )
+~@free_function_t@__builtin_acosf@float (*)( float )float (*)( float )
+~@free_function_t@__builtin_csin@complex double (*)( complex double )complex double (*)( complex double )
+~@free_function_t@__builtin_csinl@complex long double (*)( complex long double )complex long double (*)( complex long double )
+~@free_function_t@__builtin_acos@double (*)( double )double (*)( double )
+~@free_function_t@__builtin_ccosl@complex long double (*)( complex long double )complex long double (*)( complex long double )
+~@free_function_t@getc_unlocked@int (*)( ::FILE * )int (*)( ::FILE * )
+~@free_function_t@_IO_sgetn@::size_t (*)( ::_IO_FILE *,void *,::size_t )::size_t (*)( ::_IO_FILE *,void *,::size_t )
+~@free_function_t@__builtin_acosl@long double (*)( long double )long double (*)( long double )
+~@free_function_t@__builtin_csinf@complex float (*)( complex float )complex float (*)( complex float )
+~@free_function_t@_IO_ftrylockfile@int (*)( ::_IO_FILE * )int (*)( ::_IO_FILE * )
+~@free_function_t@__builtin_frame_address@void * (*)( unsigned int )void * (*)( unsigned int )
+~@free_function_t@__builtin_cpowf@complex float (*)( complex float,complex float )complex float (*)( complex float,complex float )
+~@free_function_t@__builtin_ctzll@int (*)( long long int )int (*)( long long int )
+~@free_function_t@renameat@int (*)( int,char const *,int,char const * )int (*)( int,char const *,int,char const * )
+~@free_function_t@fileno@int (*)( ::FILE * )int (*)( ::FILE * )
+~@free_function_t@gets@char * (*)( char * )char * (*)( char * )
+~@free_function_t@perror@void (*)( char const * )void (*)( char const * )
+~@free_function_t@__builtin_tanf@float (*)( float )float (*)( float )
+~@free_function_t@__builtin_tanh@double (*)( double )double (*)( double )
+~@free_function_t@freopen64@::FILE * (*)( __restrict__ char const *,__restrict__ char const *,__restrict__ ::FILE * )::FILE * (*)( __restrict__ char const *,__restrict__ char const *,__restrict__ ::FILE * )
+~@free_function_t@remove@int (*)( char const * )int (*)( char const * )
+~@free_function_t@__builtin_tanl@long double (*)( long double )long double (*)( long double )
+~@free_function_t@__builtin_modff@float (*)( float,float * )float (*)( float,float * )
+~@free_function_t@__builtin_clogf@complex float (*)( complex float )complex float (*)( complex float )
+~@free_function_t@_IO_vfprintf@int (*)( __restrict__ ::_IO_FILE *,__restrict__ char const *,::__gnuc_va_list )int (*)( __restrict__ ::_IO_FILE *,__restrict__ char const *,::__gnuc_va_list )
+~@free_function_t@freopen@::FILE * (*)( __restrict__ char const *,__restrict__ char const *,__restrict__ ::FILE * )::FILE * (*)( __restrict__ char const *,__restrict__ char const *,__restrict__ ::FILE * )
+~@free_function_t@__builtin_clogl@complex long double (*)( complex long double )complex long double (*)( complex long double )
++@free_function_t@execute_callback@int (*)( ::info *,int )int (*)( ::info *,int )
+~@free_function_t@__builtin_modfl@long double (*)( long double,long double * )long double (*)( long double,long double * )
+~@free_function_t@fread_unlocked@::size_t (*)( __restrict__ void *,::size_t,::size_t,__restrict__ ::FILE * )::size_t (*)( __restrict__ void *,::size_t,::size_t,__restrict__ ::FILE * )
+~@free_function_t@__builtin_atan@double (*)( double )double (*)( double )
+~@free_function_t@__builtin_sqrt@double (*)( double )double (*)( double )
+~@free_function_t@__builtin_isunordered@bool (*)( ... )bool (*)( ... )
+~@free_function_t@tempnam@char * (*)( char const *,char const * )char * (*)( char const *,char const * )
+~@free_function_t@tmpfile@::FILE * (*)( )::FILE * (*)( )
+~@free_function_t@vsscanf@int (*)( __restrict__ char const *,__restrict__ char const *,::__gnuc_va_list )int (*)( __restrict__ char const *,__restrict__ char const *,::__gnuc_va_list )
+~@free_function_t@__builtin_ctanhf@complex float (*)( complex float )complex float (*)( complex float )
+~@free_function_t@__builtin_fabsf@float (*)( float )float (*)( float )
+~@free_function_t@snprintf@int (*)( __restrict__ char *,::size_t,__restrict__ char const *,... )int (*)( __restrict__ char *,::size_t,__restrict__ char const *,... )
+~@free_function_t@__builtin_csqrtl@complex long double (*)( complex long double )complex long double (*)( complex long double )
+~@free_function_t@fgetc@int (*)( ::FILE * )int (*)( ::FILE * )
+~@free_function_t@pclose@int (*)( ::FILE * )int (*)( ::FILE * )
+~@free_function_t@__builtin_ctzl@int (*)( long int )int (*)( long int )
+~@free_function_t@__builtin_ceill@long double (*)( long double )long double (*)( long double )
+~@free_function_t@__builtin_ctanhl@complex long double (*)( complex long double )complex long double (*)( complex long double )
+~@free_function_t@__builtin_fabsl@long double (*)( long double )long double (*)( long double )
+~@free_function_t@__builtin_cargl@long double (*)( complex long double )long double (*)( complex long double )
+~@free_function_t@fileno_unlocked@int (*)( ::FILE * )int (*)( ::FILE * )
+~@free_function_t@fgets_unlocked@char * (*)( __restrict__ char *,int,__restrict__ ::FILE * )char * (*)( __restrict__ char *,int,__restrict__ ::FILE * )
+~@free_function_t@fgets@char * (*)( __restrict__ char *,int,__restrict__ ::FILE * )char * (*)( __restrict__ char *,int,__restrict__ ::FILE * )
+~@free_function_t@ctermid@char * (*)( char * )char * (*)( char * )
+~@free_function_t@__builtin_sinf@float (*)( float )float (*)( float )
+~@free_function_t@__builtin_inff@float (*)( )float (*)( )
+~@free_function_t@_IO_feof@int (*)( ::_IO_FILE * )int (*)( ::_IO_FILE * )
+~@free_function_t@getchar_unlocked@int (*)( )int (*)( )
+~@free_function_t@__builtin_atan2l@long double (*)( long double,long double )long double (*)( long double,long double )
+~@free_function_t@fgetc_unlocked@int (*)( ::FILE * )int (*)( ::FILE * )
+~@free_function_t@__builtin_fabs@double (*)( double )double (*)( double )
+~@free_function_t@fgetpos@int (*)( __restrict__ ::FILE *,__restrict__ ::fpos_t * )int (*)( __restrict__ ::FILE *,__restrict__ ::fpos_t * )
+~@free_function_t@__builtin_atan2f@float (*)( float,float )float (*)( float,float )
+~@free_function_t@__builtin_isfinite@bool (*)( ... )bool (*)( ... )
+~@free_function_t@__builtin_sinh@double (*)( double )double (*)( double )
+~@free_function_t@fsetpos@int (*)( ::FILE *,::fpos_t const * )int (*)( ::FILE *,::fpos_t const * )
+~@free_function_t@ftell@long int (*)( ::FILE * )long int (*)( ::FILE * )
+~@free_function_t@__builtin_floor@double (*)( double )double (*)( double )
+~@free_function_t@sprintf@int (*)( __restrict__ char *,__restrict__ char const *,... )int (*)( __restrict__ char *,__restrict__ char const *,... )
+~@free_function_t@__builtin_cabsl@long double (*)( complex long double )long double (*)( complex long double )
+~@free_function_t@vscanf@int (*)( __restrict__ char const *,::__gnuc_va_list )int (*)( __restrict__ char const *,::__gnuc_va_list )
+~@free_function_t@__builtin_popcountl@int (*)( long int )int (*)( long int )
+~@free_function_t@__builtin_cabsf@float (*)( complex float )float (*)( complex float )
+~@free_function_t@ferror_unlocked@int (*)( ::FILE * )int (*)( ::FILE * )
+~@free_function_t@fgetpos64@int (*)( __restrict__ ::FILE *,__restrict__ ::fpos64_t * )int (*)( __restrict__ ::FILE *,__restrict__ ::fpos64_t * )
+~@free_function_t@__getdelim@::__ssize_t (*)( __restrict__ char * *,__restrict__ ::size_t *,int,__restrict__ ::FILE * )::__ssize_t (*)( __restrict__ char * *,__restrict__ ::size_t *,int,__restrict__ ::FILE * )
+~@free_function_t@__overflow@int (*)( ::_IO_FILE *,int )int (*)( ::_IO_FILE *,int )
+~@free_function_t@asprintf@int (*)( __restrict__ char * *,__restrict__ char const *,... )int (*)( __restrict__ char * *,__restrict__ char const *,... )
+~@free_function_t@ferror@int (*)( ::FILE * )int (*)( ::FILE * )
+~@free_function_t@__builtin_csqrtf@complex float (*)( complex float )complex float (*)( complex float )
+~@free_function_t@__builtin_csinhl@complex long double (*)( complex long double )complex long double (*)( complex long double )
+~@free_function_t@open_memstream@::FILE * (*)( char * *,::size_t * )::FILE * (*)( char * *,::size_t * )
+~@free_function_t@__builtin_coshf@float (*)( float )float (*)( float )
+~@free_function_t@fsetpos64@int (*)( ::FILE *,::fpos64_t const * )int (*)( ::FILE *,::fpos64_t const * )
+~@free_function_t@__builtin_ccos@complex double (*)( complex double )complex double (*)( complex double )
+~@free_function_t@__builtin_ccosh@complex double (*)( complex double )complex double (*)( complex double )
+~@free_function_t@__builtin_csinhf@complex float (*)( complex float )complex float (*)( complex float )
+~@free_function_t@__builtin_coshl@long double (*)( long double )long double (*)( long double )
+~@free_function_t@tmpnam_r@char * (*)( char * )char * (*)( char * )
+~@free_function_t@_IO_seekpos@::__off64_t (*)( ::_IO_FILE *,::__off64_t,int )::__off64_t (*)( ::_IO_FILE *,::__off64_t,int )
+~@free_function_t@fseeko@int (*)( ::FILE *,::__off_t,int )int (*)( ::FILE *,::__off_t,int )
+~@free_function_t@putchar@int (*)( int )int (*)( int )
+~@free_function_t@__builtin_isinf@bool (*)( ... )bool (*)( ... )
+~@free_function_t@__builtin_ctz@int (*)( int )int (*)( int )
+~@free_function_t@__builtin_powi@double (*)( double,int )double (*)( double,int )
+~@free_function_t@fseek@int (*)( ::FILE *,long int,int )int (*)( ::FILE *,long int,int )
+~@free_function_t@__builtin_powl@long double (*)( long double,long double )long double (*)( long double,long double )
+~@free_function_t@__builtin_csqrt@complex double (*)( complex double )complex double (*)( complex double )
+~@free_function_t@__builtin_cexpl@complex long double (*)( complex long double )complex long double (*)( complex long double )
+~@free_function_t@_IO_ferror@int (*)( ::_IO_FILE * )int (*)( ::_IO_FILE * )
+~@free_function_t@fputc_unlocked@int (*)( int,::FILE * )int (*)( int,::FILE * )
+~@free_function_t@clearerr_unlocked@void (*)( ::FILE * )void (*)( ::FILE * )
+~@free_function_t@__builtin_cexpf@complex float (*)( complex float )complex float (*)( complex float )
+~@free_function_t@_IO_peekc_locked@int (*)( ::_IO_FILE * )int (*)( ::_IO_FILE * )
+~@free_function_t@scanf@int (*)( __restrict__ char const *,... )int (*)( __restrict__ char const *,... )
+~@free_function_t@__builtin_asinf@float (*)( float )float (*)( float )
+~@free_function_t@_IO_flockfile@void (*)( ::_IO_FILE * )void (*)( ::_IO_FILE * )
+~@free_function_t@__builtin_cpow@complex double (*)( complex double,complex double )complex double (*)( complex double,complex double )
+~@free_function_t@fcloseall@int (*)( )int (*)( )
+~@free_function_t@obstack_printf@int (*)( __restrict__ ::obstack *,__restrict__ char const *,... )int (*)( __restrict__ ::obstack *,__restrict__ char const *,... )
+~@free_function_t@__builtin_cexp@complex double (*)( complex double )complex double (*)( complex double )
+~@free_function_t@__builtin_cabs@double (*)( complex double )double (*)( complex double )
+~@free_function_t@__builtin_asinl@long double (*)( long double )long double (*)( long double )
+~@free_function_t@getdelim@::__ssize_t (*)( __restrict__ char * *,__restrict__ ::size_t *,int,__restrict__ ::FILE * )::__ssize_t (*)( __restrict__ char * *,__restrict__ ::size_t *,int,__restrict__ ::FILE * )
+~@free_function_t@__builtin_ctanl@complex long double (*)( complex long double )complex long double (*)( complex long double )
+~@free_function_t@__builtin_atan2@double (*)( double,double )double (*)( double,double )
+~@free_function_t@__builtin_frexpf@float (*)( float,int * )float (*)( float,int * )
+~@free_function_t@__uflow@int (*)( ::_IO_FILE * )int (*)( ::_IO_FILE * )
+~@free_function_t@tmpfile64@::FILE * (*)( )::FILE * (*)( )
+~@free_function_t@printf@int (*)( __restrict__ char const *,... )int (*)( __restrict__ char const *,... )
+~@free_function_t@fmemopen@::FILE * (*)( void *,::size_t,char const * )::FILE * (*)( void *,::size_t,char const * )
+~@free_function_t@fopen@::FILE * (*)( __restrict__ char const *,__restrict__ char const * )::FILE * (*)( __restrict__ char const *,__restrict__ char const * )
+~@free_function_t@getchar@int (*)( )int (*)( )
+~@free_function_t@putw@int (*)( int,::FILE * )int (*)( int,::FILE * )
+~@free_function_t@__builtin_expect@long int (*)( long int,long int )long int (*)( long int,long int )
+~@free_function_t@puts@int (*)( char const * )int (*)( char const * )
+~@free_function_t@__builtin_ctanf@complex float (*)( complex float )complex float (*)( complex float )
+~@free_function_t@fdopen@::FILE * (*)( int,char const * )::FILE * (*)( int,char const * )
+~@free_function_t@__builtin_ctanh@complex double (*)( complex double )complex double (*)( complex double )
+~@free_function_t@__builtin_islessequal@bool (*)( ... )bool (*)( ... )
+~@free_function_t@__builtin_carg@double (*)( complex double )double (*)( complex double )
+~@free_function_t@__builtin_memchr@void * (*)( void const *,int,unsigned int )void * (*)( void const *,int,unsigned int )
+~@free_function_t@__builtin_sqrtl@long double (*)( long double )long double (*)( long double )
+~@free_function_t@fclose@int (*)( ::FILE * )int (*)( ::FILE * )
+~@free_function_t@__builtin_nans@double (*)( char const * )double (*)( char const * )
+~@free_function_t@__builtin_frexpl@long double (*)( long double,int * )long double (*)( long double,int * )
+~@free_function_t@__asprintf@int (*)( __restrict__ char * *,__restrict__ char const *,... )int (*)( __restrict__ char * *,__restrict__ char const *,... )
+~@free_function_t@dprintf@int (*)( int,__restrict__ char const *,... )int (*)( int,__restrict__ char const *,... )
+~@free_function_t@__builtin_isnormal@bool (*)( ... )bool (*)( ... )
+~@free_function_t@__builtin_floorf@float (*)( float )float (*)( float )
+~@free_function_t@ftello64@::__off64_t (*)( ::FILE * )::__off64_t (*)( ::FILE * )
+~@free_function_t@__builtin_atanf@float (*)( float )float (*)( float )
+~@free_function_t@__builtin_clog@complex double (*)( complex double )complex double (*)( complex double )
+~@free_function_t@__builtin_floorl@long double (*)( long double )long double (*)( long double )
+~@free_function_t@__builtin_return@void (*)( void * )void (*)( void * )
+~@free_function_t@__builtin_powil@long double (*)( long double,int )long double (*)( long double,int )
+~@free_function_t@setlinebuf@void (*)( ::FILE * )void (*)( ::FILE * )
+~@free_function_t@__builtin_log@double (*)( double )double (*)( double )
+~@free_function_t@__builtin_atanl@long double (*)( long double )long double (*)( long double )
+~@free_function_t@__builtin_log10l@long double (*)( long double )long double (*)( long double )
+~@free_function_t@__builtin_sqrtf@float (*)( float )float (*)( float )
+~@free_function_t@__builtin_powf@float (*)( float,float )float (*)( float,float )
+~@free_function_t@__builtin_tanhl@long double (*)( long double )long double (*)( long double )
+~@free_function_t@__builtin_log10f@float (*)( float )float (*)( float )
+~@free_function_t@__builtin_tan@double (*)( double )double (*)( double )
+~@free_function_t@fopencookie@::FILE * (*)( __restrict__ void *,__restrict__ char const *,::_IO_cookie_io_functions_t )::FILE * (*)( __restrict__ void *,__restrict__ char const *,::_IO_cookie_io_functions_t )
+~@free_function_t@__builtin_infl@long double (*)( )long double (*)( )
+~@free_function_t@fscanf@int (*)( __restrict__ ::FILE *,__restrict__ char const *,... )int (*)( __restrict__ ::FILE *,__restrict__ char const *,... )
+~@free_function_t@__builtin_frexp@double (*)( double,int * )double (*)( double,int * )
+~@free_function_t@ftrylockfile@int (*)( ::FILE * )int (*)( ::FILE * )
+~@free_function_t@cuserid@char * (*)( char * )char * (*)( char * )
+~@free_function_t@__builtin_ldexp@double (*)( double,int )double (*)( double,int )
+~@free_function_t@setbuffer@void (*)( __restrict__ ::FILE *,__restrict__ char *,::size_t )void (*)( __restrict__ ::FILE *,__restrict__ char *,::size_t )
+~@free_function_t@_IO_vfscanf@int (*)( __restrict__ ::_IO_FILE *,__restrict__ char const *,::__gnuc_va_list,__restrict__ int * )int (*)( __restrict__ ::_IO_FILE *,__restrict__ char const *,::__gnuc_va_list,__restrict__ int * )
+~@free_function_t@ungetc@int (*)( int,::FILE * )int (*)( int,::FILE * )
+~@free_function_t@fprintf@int (*)( __restrict__ ::FILE *,__restrict__ char const *,... )int (*)( __restrict__ ::FILE *,__restrict__ char const *,... )
+~@free_function_t@vsprintf@int (*)( __restrict__ char *,__restrict__ char const *,::__gnuc_va_list )int (*)( __restrict__ char *,__restrict__ char const *,::__gnuc_va_list )
+~@free_function_t@rename@int (*)( char const *,char const * )int (*)( char const *,char const * )
+~@free_function_t@vsnprintf@int (*)( __restrict__ char *,::size_t,__restrict__ char const *,::__gnuc_va_list )int (*)( __restrict__ char *,::size_t,__restrict__ char const *,::__gnuc_va_list )
+~@free_function_t@__builtin_sinhl@long double (*)( long double )long double (*)( long double )
+~@free_function_t@sscanf@int (*)( __restrict__ char const *,__restrict__ char const *,... )int (*)( __restrict__ char const *,__restrict__ char const *,... )
+~@free_function_t@__builtin_powif@float (*)( float,int )float (*)( float,int )
+~@free_function_t@__builtin_sinhf@float (*)( float )float (*)( float )
+~@free_function_t@fread@::size_t (*)( __restrict__ void *,::size_t,::size_t,__restrict__ ::FILE * )::size_t (*)( __restrict__ void *,::size_t,::size_t,__restrict__ ::FILE * )
+~@free_function_t@ftello@::__off_t (*)( ::FILE * )::__off_t (*)( ::FILE * )
+~@free_function_t@fwrite_unlocked@::size_t (*)( __restrict__ void const *,::size_t,::size_t,__restrict__ ::FILE * )::size_t (*)( __restrict__ void const *,::size_t,::size_t,__restrict__ ::FILE * )
+~@free_function_t@popen@::FILE * (*)( char const *,char const * )::FILE * (*)( char const *,char const * )
+~@free_function_t@__builtin_ctan@complex double (*)( complex double )complex double (*)( complex double )
+~@free_function_t@__builtin_sin@double (*)( double )double (*)( double )
+~@free_function_t@vprintf@int (*)( __restrict__ char const *,::__gnuc_va_list )int (*)( __restrict__ char const *,::__gnuc_va_list )
+~@free_function_t@_IO_seekoff@::__off64_t (*)( ::_IO_FILE *,::__off64_t,int,int )::__off64_t (*)( ::_IO_FILE *,::__off64_t,int,int )
+~@free_function_t@feof@int (*)( ::FILE * )int (*)( ::FILE * )
+~@free_function_t@putc@int (*)( int,::FILE * )int (*)( int,::FILE * )
+~@free_function_t@__builtin_logl@long double (*)( long double )long double (*)( long double )
+~@free_function_t@__builtin_asin@double (*)( double )double (*)( double )
+~@free_function_t@clearerr@void (*)( ::FILE * )void (*)( ::FILE * )
+~@free_function_t@__builtin_logf@float (*)( float )float (*)( float )
+~@free_function_t@getc@int (*)( ::FILE * )int (*)( ::FILE * )
+~@free_function_t@__builtin_isgreater@bool (*)( ... )bool (*)( ... )
+~@free_function_t@putchar_unlocked@int (*)( int )int (*)( int )
+~@free_function_t@vfprintf@int (*)( __restrict__ ::FILE *,__restrict__ char const *,::__gnuc_va_list )int (*)( __restrict__ ::FILE *,__restrict__ char const *,::__gnuc_va_list )
+~@free_function_t@rewind@void (*)( ::FILE * )void (*)( ::FILE * )
+~@free_function_t@putc_unlocked@int (*)( int,::FILE * )int (*)( int,::FILE * )
+~@free_function_t@vfscanf@int (*)( __restrict__ ::FILE *,__restrict__ char const *,::__gnuc_va_list )int (*)( __restrict__ ::FILE *,__restrict__ char const *,::__gnuc_va_list )
+~@free_function_t@__builtin_isless@bool (*)( ... )bool (*)( ... )
+~@free_function_t@getw@int (*)( ::FILE * )int (*)( ::FILE * )
+~@free_function_t@flockfile@void (*)( ::FILE * )void (*)( ::FILE * )
+~@free_function_t@__builtin_nansf@float (*)( char const * )float (*)( char const * )
+~@free_function_t@__builtin_ccoshl@complex long double (*)( complex long double )complex long double (*)( complex long double )
+~@free_function_t@vasprintf@int (*)( __restrict__ char * *,__restrict__ char const *,::__gnuc_va_list )int (*)( __restrict__ char * *,__restrict__ char const *,::__gnuc_va_list )
+~@free_function_t@_IO_free_backup_area@void (*)( ::_IO_FILE * )void (*)( ::_IO_FILE * )
+~@free_function_t@__builtin_ccoshf@complex float (*)( complex float )complex float (*)( complex float )
+~@free_function_t@__builtin_nansl@long double (*)( char const * )long double (*)( char const * )
+~@free_function_t@__builtin_return_address@void * (*)( unsigned int )void * (*)( unsigned int )
+~@free_function_t@__builtin_ceilf@float (*)( float )float (*)( float )
+~@free_function_t@__builtin_isnan@bool (*)( ... )bool (*)( ... )
+~@free_function_t@__builtin_ccosf@complex float (*)( complex float )complex float (*)( complex float )
+~@free_function_t@__builtin_cosf@float (*)( float )float (*)( float )
+~@free_function_t@fputs_unlocked@int (*)( __restrict__ char const *,__restrict__ ::FILE * )int (*)( __restrict__ char const *,__restrict__ ::FILE * )
+~@free_function_t@setbuf@void (*)( __restrict__ ::FILE *,__restrict__ char * )void (*)( __restrict__ ::FILE *,__restrict__ char * )
+~@free_function_t@__builtin_cosh@double (*)( double )double (*)( double )
+~@free_function_t@__builtin_isgreaterequal@bool (*)( ... )bool (*)( ... )
+~@free_function_t@__builtin_cosl@long double (*)( long double )long double (*)( long double )
+~@free_function_t@funlockfile@void (*)( ::FILE * )void (*)( ::FILE * )
+~@free_function_t@vdprintf@int (*)( int,__restrict__ char const *,::__gnuc_va_list )int (*)( int,__restrict__ char const *,::__gnuc_va_list )
+~@free_function_t@__builtin_ceil@double (*)( double )double (*)( double )
+~@free_function_t@_IO_getc@int (*)( ::_IO_FILE * )int (*)( ::_IO_FILE * )
+~@free_function_t@__builtin_fmodf@float (*)( float,float )float (*)( float,float )
+~@free_function_t@__builtin_cos@double (*)( double )double (*)( double )
+~@free_function_t@fopen64@::FILE * (*)( __restrict__ char const *,__restrict__ char const * )::FILE * (*)( __restrict__ char const *,__restrict__ char const * )
+~@free_function_t@__builtin_fmodl@long double (*)( long double,long double )long double (*)( long double,long double )
+~@free_function_t@__builtin_sinl@long double (*)( long double )long double (*)( long double )
+~@free_function_t@setvbuf@int (*)( __restrict__ ::FILE *,__restrict__ char *,int,::size_t )int (*)( __restrict__ ::FILE *,__restrict__ char *,int,::size_t )
+~@free_function_t@_IO_funlockfile@void (*)( ::_IO_FILE * )void (*)( ::_IO_FILE * )
Added: pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/binaries/function_ptr_as_variable.os
===================================================================
(Binary files differ)
Property changes on: pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/binaries/function_ptr_as_variable.os
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/binaries/function_ptr_as_variable.py
===================================================================
--- pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/binaries/function_ptr_as_variable.py (rev 0)
+++ pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/binaries/function_ptr_as_variable.py 2009-12-26 20:13:12 UTC (rev 1785)
@@ -0,0 +1,24 @@
+# This file has been generated by Py++.
+
+import ctypes
+
+import ctypes_utils
+
+libfunction_ptr_as_variable_lib = ctypes.CDLL( r"/home/roman/language-binding/sources/pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/binaries/libfunction_ptr_as_variable.so" )
+
+libfunction_ptr_as_variable_lib.undecorated_names = {#mapping between decorated and undecorated names
+ "extern int execute_callback(info * info, int arg1) [free function]" : "_Z16execute_callbackP4infoi",
+ "_Z16execute_callbackP4infoi" : "extern int execute_callback(info * info, int arg1) [free function]",
+}
+
+class info(ctypes.Structure):
+ """class info"""
+
+info._fields_ = [ #class info
+ ("do_smth_fun", ctypes.CFUNCTYPE( ctypes.c_int, ctypes.c_int )),
+]
+
+do_smth_fun_t = ctypes.CFUNCTYPE( ctypes.c_int, ctypes.c_int )
+
+execute_callback_type = ctypes.CFUNCTYPE( ctypes.c_int, ctypes.POINTER( info ), ctypes.c_int )
+execute_callback = execute_callback_type( ( libfunction_ptr_as_variable_lib.undecorated_names["extern int execute_callback(info * info, int arg1) [free function]"], libfunction_ptr_as_variable_lib ) )
Added: pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/function_ptr_as_variable.cpp
===================================================================
--- pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/function_ptr_as_variable.cpp (rev 0)
+++ pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/function_ptr_as_variable.cpp 2009-12-26 20:13:12 UTC (rev 1785)
@@ -0,0 +1,5 @@
+#include "function_ptr_as_variable.h"
+
+EXPORT_SYMBOL int execute_callback(struct info* info, int v) {
+ return info->do_smth_fun(v);
+}
Added: pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/function_ptr_as_variable.h
===================================================================
--- pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/function_ptr_as_variable.h (rev 0)
+++ pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/function_ptr_as_variable.h 2009-12-26 20:13:12 UTC (rev 1785)
@@ -0,0 +1,11 @@
+#include "libconfig.h"
+#include <stdio.h>
+
+typedef int do_smth_fun_t(int);
+
+struct EXPORT_SYMBOL info {
+ do_smth_fun_t* do_smth_fun;
+};
+
+EXPORT_SYMBOL int execute_callback(struct info* info, int);
+
Added: pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/sconscript
===================================================================
--- pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/sconscript (rev 0)
+++ pyplusplus_dev/unittests/data/ctypes/function_ptr_as_variable/sconscript 2009-12-26 20:13:12 UTC (rev 1785)
@@ -0,0 +1,7 @@
+Import('*')
+
+target_name = 'function_ptr_as_variable'
+shlib = env.SharedLibrary( target=target_name
+ , source=[ target_name + '.cpp' ]
+ , CPPPATH=['#data'] )
+env.Alias( target_name, shlib )
Modified: pyplusplus_dev/unittests/sconstruct
===================================================================
--- pyplusplus_dev/unittests/sconstruct 2009-12-26 19:21:49 UTC (rev 1784)
+++ pyplusplus_dev/unittests/sconstruct 2009-12-26 20:13:12 UTC (rev 1785)
@@ -32,7 +32,8 @@
, 'variables'
, 'varargs'
, 'templates'
- , 'circular_references' ]
+ , 'circular_references'
+ , 'function_ptr_as_variable' ]
for s in scripts:
SConscript( 'data/ctypes/%s/sconscript' % s
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|