[pygccxml-commit] SF.net SVN: pygccxml: [624] pyplusplus_dev/pyplusplus/code_repository/ convenienc
Brought to you by:
mbaas,
roman_yakovenko
From: <rom...@us...> - 2006-10-05 07:43:54
|
Revision: 624 http://svn.sourceforge.net/pygccxml/?rev=624&view=rev Author: roman_yakovenko Date: 2006-10-05 00:43:48 -0700 (Thu, 05 Oct 2006) Log Message: ----------- replace Py_size_t with ssize_t Modified Paths: -------------- pyplusplus_dev/pyplusplus/code_repository/convenience.py Modified: pyplusplus_dev/pyplusplus/code_repository/convenience.py =================================================================== --- pyplusplus_dev/pyplusplus/code_repository/convenience.py 2006-10-05 07:17:04 UTC (rev 623) +++ pyplusplus_dev/pyplusplus/code_repository/convenience.py 2006-10-05 07:43:48 UTC (rev 624) @@ -32,14 +32,14 @@ } inline void -ensure_sequence( boost::python::object seq, Py_ssize_t expected_length=-1 ){ +ensure_sequence( boost::python::object seq, boost::python::ssize_t expected_length=-1 ){ PyObject* seq_impl = seq.ptr(); if( !PySequence_Check( seq_impl ) ){ raise_error( PyExc_TypeError, "Sequence expected" ); } - Py_ssize_t length = PySequence_Length( seq_impl ); + boost::python::ssize_t length = PySequence_Length( seq_impl ); if( expected_length != -1 && length != expected_length ){ std::stringstream err; err << "Expected sequence length is " << expected_length << ". " @@ -49,11 +49,11 @@ } template< class ExpectedType > -void ensure_uniform_sequence( boost::python::object seq, Py_ssize_t expected_length=-1 ){ +void ensure_uniform_sequence( boost::python::object seq, boost::python::ssize_t expected_length=-1 ){ ensure_sequence( seq, expected_length ); - Py_ssize_t length = boost::python::len( seq ); - for( Py_ssize_t index = 0; index < length; ++index ){ + boost::python::ssize_t length = boost::python::len( seq ); + for( boost::python::ssize_t index = 0; index < length; ++index ){ boost::python::object item = seq[index]; boost::python::extract<ExpectedType> type_checker( item ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |