ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> cpp-sig
cpp-sig
Re: [C++-sig] function with >15 args yields get_signature error
by Renato Araujo other posts by this author
Oct 26 2009 10:21AM messages near this date
Re: [C++-sig] function with >15 args yields get_signature error | Re: [C++-sig] function with >15 args yields get_signature error
Hi,

Try use this flag in your compilation, -DBOOST_PYTHON_MAX_ARITY=XX


The default value is 15, the I think thi can solve your problem.

BR
Renato Araujo Oliveira Filho




On Mon, Oct 26, 2009 at 2:01 PM, Eilif Mueller <eilif@[...].de>  wrote:
>  Hi,
> 
>  Wrapping a function f with 16 arguments:
> 
>  int f(int x1, int x2, int x3, int x4, int x5,
>       int x6, int x7, int x8, int x9, int x10,
>       int x11, int x12, int x13, int x14, int x15,
>       int x16) {
> 
>   return x1;
> 
>  }
> 
>  BOOST_PYTHON_MODULE(test)
>  {
> 
>   def("f",f);
> 
>  }
> 
> 
>  yields
> 
>  /usr/include/boost/python/make_function.hpp: In function ‘boost::python::api::object boo
st::python::make_function(F) [with F = int (*)(int, int, int, int, int, int, int, int, int, 
int, int, int, int, int, int, int)]’:
>  /usr/include/boost/python/def.hpp:82:   instantiated from ‘boost::python::api::object b
oost::python::detail::make_function1(T, ...) [with T = int (*)(int, int, int, int, int, int,
 int, int, int, int, int, int, int, int, int, int)]’
>  /usr/include/boost/python/def.hpp:91:   instantiated from ‘void boost::python::def(cons
t char*, Fn) [with Fn = int (*)(int, int, int, int, int, int, int, int, int, int, int, int, 
int, int, int, int)]’
>  test_module.cpp:20:   instantiated from here
>  /usr/include/boost/python/make_function.hpp:104: error: no matching function for call to â
€˜get_signature(int (*&)(int, int, int, int, int, int, int, int, int, int, int, int, int, in
t, int, int))’
>  make: *** [stream.o] Error 1
> 
> 
>  whereas all is fine if that last arg "int x16" is removed.  All of gcc-4.2, gcc-4.3 and g
cc-4.4 seem to exhibit the same behaviour.  Same effect for libboost-python1.38-dev on Ubun
tu karmic and libboost-python1.35-dev on Ubuntu jaunty.
> 
>  I need that 16th arg and more ... about 32 args, I think.
> 
>  Thanks for any help you can offer.
> 
>  cheers,
> 
>  Eilif
> 
> 
> 
> 
> 
> 
>  --
>  Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
>  sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser
> 
>  --
>  Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
>  sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser
>  _______________________________________________
>  Cplusplus-sig mailing list
>  Cplusplus-sig@[...].org
>  http://mail.python.org/mailman/listinfo/cplusplus-sig
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@[...].org
http://mail.python.org/mailman/listinfo/cplusplus-sig
Thread:
Eilif Mueller
William Ladwig
Eilif Mueller
Matthew Scouten
Troy D. Straszheim
Renato Araujo
Troy D. Straszheim

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved