Skip to content

Commit 77b6aa7

Browse files
committed
IECoreBinding : Use Py_ssize_t
MSVC has `SSIZE_T`, but not `ssize_t`, which is not part of the standard it seems. Python's `pyport.h` file does a `typedef` for it, but something must have changed between Python `3.7` and `3.10` that causes that to not be included from what we're using. It does seem that the official recommendation is to use `Py_ssize_t` now.
1 parent 5dedde4 commit 77b6aa7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/IECorePython/IECoreBinding.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ IECOREPYTHON_API std::string repr( T &x );
7979

8080
/// For backwards compatibility with older versions of boost,
8181
/// which don't provide boost::python::len
82-
IECOREPYTHON_API inline ssize_t len( const boost::python::object &obj )
82+
IECOREPYTHON_API inline Py_ssize_t len( const boost::python::object &obj )
8383
{
84-
ssize_t result = PyObject_Length( obj.ptr() );
84+
Py_ssize_t result = PyObject_Length( obj.ptr() );
8585

8686
if( PyErr_Occurred() )
8787
{

0 commit comments

Comments
 (0)