Merge branch 'ahnolds-classic_python'
* ahnolds-classic_python: Updating changelog and marking -classic as passing CI Support checking names of old-style classic classes Don't claim to new-style support in classic mode Clean up setting _object Removing __swig_getmethods__ for static methods Support python(pre|ap)pend on static methods in classic mode Add support for static methods in classic mode When possible, use PyInt rather than PyLong
This commit is contained in:
commit
bb01ed3286
8 changed files with 53 additions and 34 deletions
|
|
@ -67,7 +67,7 @@ SWIGINTERNINLINE PyObject*
|
|||
/* long */
|
||||
|
||||
%fragment(SWIG_From_frag(long),"header") {
|
||||
%define_as(SWIG_From_dec(long), PyLong_FromLong)
|
||||
%define_as(SWIG_From_dec(long), PyInt_FromLong)
|
||||
}
|
||||
|
||||
%fragment(SWIG_AsVal_frag(long),"header",
|
||||
|
|
@ -123,7 +123,7 @@ SWIGINTERNINLINE PyObject*
|
|||
SWIG_From_dec(unsigned long)(unsigned long value)
|
||||
{
|
||||
return (value > LONG_MAX) ?
|
||||
PyLong_FromUnsignedLong(value) : PyLong_FromLong(%numeric_cast(value,long));
|
||||
PyLong_FromUnsignedLong(value) : PyInt_FromLong(%numeric_cast(value,long));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -186,7 +186,7 @@ SWIGINTERNINLINE PyObject*
|
|||
SWIG_From_dec(long long)(long long value)
|
||||
{
|
||||
return ((value < LONG_MIN) || (value > LONG_MAX)) ?
|
||||
PyLong_FromLongLong(value) : PyLong_FromLong(%numeric_cast(value,long));
|
||||
PyLong_FromLongLong(value) : PyInt_FromLong(%numeric_cast(value,long));
|
||||
}
|
||||
%#endif
|
||||
}
|
||||
|
|
@ -244,7 +244,7 @@ SWIGINTERNINLINE PyObject*
|
|||
SWIG_From_dec(unsigned long long)(unsigned long long value)
|
||||
{
|
||||
return (value > LONG_MAX) ?
|
||||
PyLong_FromUnsignedLongLong(value) : PyLong_FromLong(%numeric_cast(value,long));
|
||||
PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(%numeric_cast(value,long));
|
||||
}
|
||||
%#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue