Changeset 11373

Show
Ignore:
Timestamp:
04/28/07 14:49:07 (2 years ago)
Author:
hobu
Message:

make sure to guard the PY_VERSION_HEX macro from swig picking it up

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/swig/include/python/typemaps_python.i

    r11372 r11373  
    443443{ 
    444444  /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */ 
    445   #if (PY_VERSION_HEX <= 0x02050000) 
     445#ifdef PY_VERSION_HEX 
     446#if (PY_VERSION_HEX >= 0x02050000) 
     447    /* Python version was greater than 2.5 */ 
    446448     PyString_AsStringAndSize($input, &$2, ( Py_ssize_t*)&$1 ); 
    447   #else 
     449#else 
     450    /* Python version was less than 2.5 */ 
    448451     PyString_AsStringAndSize($input, &$2, &$1 ); 
    449   #endif 
     452#endif 
     453#endif 
    450454} 
    451455%typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER)