[pygccxml-commit] SF.net SVN: pygccxml:[1453] pyplusplus_dev/pyplusplus
Brought to you by:
mbaas,
roman_yakovenko
|
From: <rom...@us...> - 2008-11-24 20:22:37
|
Revision: 1453
http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1453&view=rev
Author: roman_yakovenko
Date: 2008-11-24 20:22:35 +0000 (Mon, 24 Nov 2008)
Log Message:
-----------
fixing 64 bit issues in ctypes integration functionality
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/code_creators/global_variable.py
pyplusplus_dev/pyplusplus/code_repository/ctypes_integration.py
Modified: pyplusplus_dev/pyplusplus/code_creators/global_variable.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/global_variable.py 2008-11-24 07:52:15 UTC (rev 1452)
+++ pyplusplus_dev/pyplusplus/code_creators/global_variable.py 2008-11-24 20:22:35 UTC (rev 1453)
@@ -177,7 +177,7 @@
#TODO: porting to 64Bit is welcome
result.append( algorithm.create_identifier( self, '::boost::python::scope' ) )
result.append( '().attr("%s")' % self.alias )
- result.append( ' = boost::uint32_t( boost::addressof( %s ) );' % self.decl_identifier )
+ result.append( ' = size_t( boost::addressof( %s ) );' % self.decl_identifier )
return ''.join( result )
def _get_system_headers_impl( self ):
Modified: pyplusplus_dev/pyplusplus/code_repository/ctypes_integration.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_repository/ctypes_integration.py 2008-11-24 07:52:15 UTC (rev 1452)
+++ pyplusplus_dev/pyplusplus/code_repository/ctypes_integration.py 2008-11-24 20:22:35 UTC (rev 1453)
@@ -25,7 +25,6 @@
#include "boost/utility/addressof.hpp"
#include "boost/mpl/vector.hpp"
#include "boost/function.hpp"
-#include "boost/cstdint.hpp"
#include "boost/type.hpp"
#include "boost/bind.hpp"
@@ -33,23 +32,23 @@
namespace pyplusplus{ namespace convenience{
template< typename TType, typename TMemVarType >
-boost::uint32_t
+size_t
addressof( const TType* inst_ptr, const TMemVarType TType::* offset){
if( !inst_ptr ){
throw std::runtime_error( "unable to dereference null pointer" );
}
const TType& inst = *inst_ptr;
- return boost::uint32_t( boost::addressof( inst.*offset ) );
+ return size_t( boost::addressof( inst.*offset ) );
}
template< typename TType >
-boost::uint32_t
+size_t
addressof_inst( const TType* inst_ptr){
if( !inst_ptr ){
throw std::runtime_error( "unable to dereference null pointer" );
}
- return boost::uint32_t( inst_ptr );
+ return size_t( inst_ptr );
}
template< typename TType, typename TMemVarType >
@@ -59,7 +58,7 @@
namespace pyppc = pyplusplus::convenience;
return bpl::make_function( boost::bind( &pyppc::addressof< TType, TMemVarType >, _1, offset )
, bpl::default_call_policies()
- , boost::mpl::vector< boost::uint32_t, const TType* >() );
+ , boost::mpl::vector< size_t, const TType* >() );
}
template< typename TType >
@@ -69,7 +68,7 @@
namespace pyppc = pyplusplus::convenience;
return bpl::make_function( boost::bind( &pyppc::addressof_inst< TType >, _1 )
, bpl::default_call_policies()
- , boost::mpl::vector< boost::uint32_t, const TType* >() );
+ , boost::mpl::vector< size_t, const TType* >() );
}
class register_addressof_static_var : public boost::python::def_visitor<register_addressof_static_var>
@@ -91,7 +90,7 @@
}
private:
- boost::uint32_t m_address;
+ size_t m_address;
const char* m_name;
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|