Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Problem with pyplusplus ctypes intergration on AMD64 Machines
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tim Ansell  
View profile  
 More options Jan 28 2009, 8:16 pm
From: Tim Ansell <mit...@gmail.com>
Date: Thu, 29 Jan 2009 12:16:55 +1100
Local: Wed, Jan 28 2009 8:16 pm
Subject: Problem with pyplusplus ctypes intergration on AMD64 Machines
Hello,

It appears that the ctypes_intergration stuff in pyplusplus is not 64bit
safe. The general basics is that it is casting a void* to a
boost::uint32_t (which can't fit a void* on 64bit platforms).

See the error below,

        /usr/include/OGRE -I/usr/include/python2.5 -I/usr/include/boost
        generated/ogre_1.6.1/PatchSurface.pypp.cpp
        g++ -o build_dir_2.5/ogre_1.6.1/PixelBox.pypp.os -c `pkg-config
        --cflags OGRE` -I -O3 -I./ -DBOOST_PYTHON_MAX_ARITY=19
        -DBOOST_PYTHON_NO_PY_SIGNATURES
        -I/usr/local/google/foss/pyogre/python-ogre/generated/ogre_1.6.1
        -D__PYTHONOGRE_BUILD_CODE -g -I/usr/include -L/usr/lib
        -L/usr/lib64 -fPIC -I/usr/include/boost -I/usr/include/OGRE
        -I/usr/include/python2.5 -I/usr/include/boost
        generated/ogre_1.6.1/PixelBox.pypp.cpp
        generated/ogre_1.6.1/__ctypes_integration.pypp.hpp: In function
        ‘uint32_t pyplusplus::convenience::addressof(const TType*, const
        TMemVarType TType::*) [with TType = Ogre::PixelBox, TMemVarType
        = void*]’:
        generated/ogre_1.6.1/__ctypes_integration.pypp.hpp:49:
        instantiated from ‘boost::python::api::object
        pyplusplus::convenience::make_addressof_getter(const TMemVarType
        TType::*) [with TType = Ogre::PixelBox, TMemVarType = void*]’
        generated/ogre_1.6.1/PixelBox.pypp.cpp:162: instantiated from
        here
        generated/ogre_1.6.1/__ctypes_integration.pypp.hpp:29: error:
        cast from ‘void* const*’ to ‘uint32_t’ loses precision
        scons: * [build_dir_2.5/ogre_1.6.1/PixelBox.pypp.os] Error 1
        scons: building terminated because of errors.

I ended up changing the code in
pyplusplus/code_repository/ctypes_intergration.py from boost::uint32_t
to std::size_t.

It seems to compile and work now...

Is that the correct solution?

Tim 'mithro' Ansell


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.