[C++-sig] Re: function::argument_error / overloads & docstrings
Nikolay Mladenov
nickm at sitius.com
Thu Nov 6 23:30:31 CET 2003
David Abrahams wrote:
>
> Nikolay Mladenov <nickm at sitius.com> writes:
>
> > I is right here:
>
> Nikolay,
>
> if this is a response to:
>
> >> Sorry, that MSVC bug obscures our current functionality. Could you
> >> show the current result with the workaround in place (or use a
> >> different compiler)?
>
> then I was actually asking you to contrast the result of your patch
> which includes argument names with what's obtained with the current
> CVS but without the results of the MSVC bug (IOW, for you, just a
> simple workaround patch).
Aah! Well you know already, sorry I didn't understand the question.
>
> What do you think of the enclosed?
>
> function.cpp.diffName: function.cpp.diff
I like it better.
But with MSVC 6.5 it raises:
TypeError: No to_python (by-value) converter found for C++ type: char
again.
the problematic line is
param += (len(kv) > 1 ? " %s=%r" : " %s") % kv;
the MSVC stack:
KERNEL32! 77f1d479()
MSVCRT! 78008fa5()
boost::python::throw_error_already_set() line 59
boost::python::converter::registration::to_python(const void *
0x05fd0200) line 55
boost::python::converter::detail::arg_to_python_base::arg_to_python_base(const
void * 0x05fd0200, const boost::python::converter::registration & {...})
line 25 + 19 bytes
boost::python::converter::detail::pointer_deep_arg_to_python<char
*>::pointer_deep_arg_to_python<char *>(char * 0x05fd0200) line 217 + 46
bytes
boost::python::converter::arg_to_python<char *>::arg_to_python<char
*>(char * const & 0x05fd0200) line 258 + 21 bytes
boost::python::api::object_initializer_impl<0,0>::get(char * const &
0x05fd0200, boost::mpl::bool_<0> {...}) line 356 + 12 bytes
boost::python::api::object_base_initializer(char * const & 0x05fd0200)
line 285 + 22 bytes
boost::python::api::object::object() line 298 + 16 bytes
boost::python::api::operator%(char * const & 0x05fd0200, const
boost::python::api::object & {...}) line 102 + 78 bytes
on the other hand this works fine:
if ( len(kv) > 1 )
param += " %s=%r" % kv;
else
param += " %s" % kv;
here the call is :
boost::python::api::operator%(const char [7]& 0x05fc1474, const
boost::python::api::object & {...}) line 102 + 78 bytes
Now, if I can get you to like my docstrings idea ...;-)
--
Nikolay Mladenov
Sitius Automaion Inc.
www.sitius.com
More information about the Cplusplus-sig
mailing list