[C++-sig] Can't convert to unsigned int

Mark Russell mrussell8081 at pacbell.net
Wed Dec 11 19:30:23 CET 2002

In my case I need to set the flag in python, it is used in the wrapped c++
api.  So for example if I set the flag as follows in python:

>> someflag = flag(0x80000000L)

I can then use it to make my wrapped api call

>> apicall(someflag)

My converter then extracts the value of flag for use in the api
all.  --Mark

-----Original Message-----
From: c++-sig-admin at python.org [mailto:c++-sig-admin at python.org]On
Behalf Of David Abrahams
Sent: Wednesday, December 11, 2002 10:15 AM
To: c++-sig at python.org
Subject: Re: [C++-sig] Can't convert to unsigned int

Mark Russell <mrussell8081 at pacbell.net> writes:

> David,
> Thanks for your reply--the approach I have taken to work around this case
> to create a python extension object called flag.  This object simply
> the long value I want to set.  On the boost side I use an
> converter to retrieve the value.  This works just fine so I will continue
> use this approach.  --Mark

I guess I don't see how that helps.  Don't you eventually need a
Python integer type somewhere?

                       David Abrahams
   dave at boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

C++-sig mailing list
C++-sig at python.org

More information about the Cplusplus-sig mailing list