[C++-sig] Question about Boost.Python and unsigneds

David Abrahams dave at boost-consulting.com
Thu Jun 23 08:12:50 CEST 2005


"Ram, Siddharth" <sram at qualcomm.com> writes:

> I have the following in my Boost Module:
>
> #include <boost/python.hpp>
> using namespace boost::python;
> #include "RLPTypesPkg.h"
> BOOST_PYTHON_MODULE (RLPTypesPkg)
>  {
>         def("RLPDEFS_CONFIG_INITIAL",RLPDEFS_CONFIG_INITIAL);
> [...]
>

That can't work.  

http://www.boost.org/libs/python/doc/v2/def.html#def-spec makes it
pretty clear what def requires of its 2nd argument, and an unsigned
int doesn't satisfy any of those requirements.

You might check out how the module attributes "yes" and "no" are
created in http://www.boost.org/libs/python/doc/v2/scope.html#examples

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com




More information about the Cplusplus-sig mailing list