using <> when including lib files, fix char{ANY], add char FIXSIZE[ANY], fix pyfragments.swg, fixing *.swg and *.i names
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6250 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
0420621ce7
commit
349e6bc6ee
29 changed files with 182 additions and 83 deletions
|
|
@ -8,18 +8,42 @@
|
|||
methods. In the other cases, some extra work is needed.
|
||||
*/
|
||||
|
||||
|
||||
%insert(header) {
|
||||
SWIG_define(SWIG_From(signed char), PyInt_FromLong)
|
||||
SWIG_define(SWIG_From(unsigned char), PyInt_FromLong)
|
||||
SWIG_define(SWIG_From(short), PyInt_FromLong)
|
||||
SWIG_define(SWIG_From(unsigned short), PyInt_FromLong)
|
||||
SWIG_define(SWIG_From(int), PyInt_FromLong)
|
||||
SWIG_define(SWIG_From(long), PyInt_FromLong)
|
||||
SWIG_define(SWIG_From(float), PyFloat_FromDouble)
|
||||
SWIG_define(SWIG_From(double), PyFloat_FromDouble)
|
||||
%fragment(SWIG_From_frag(signed char),"header") {
|
||||
SWIG_define(SWIG_From(signed char), PyInt_FromLong)
|
||||
}
|
||||
|
||||
%fragment(SWIG_From_frag(unsigned char),"header") {
|
||||
SWIG_define(SWIG_From(unsigned char), PyInt_FromLong)
|
||||
}
|
||||
|
||||
%fragment(SWIG_From_frag(short),"header") {
|
||||
SWIG_define(SWIG_From(short), PyInt_FromLong)
|
||||
}
|
||||
|
||||
%fragment(SWIG_From_frag(unsigned short),"header") {
|
||||
SWIG_define(SWIG_From(unsigned short), PyInt_FromLong)
|
||||
}
|
||||
|
||||
%fragment(SWIG_From_frag(int),"header") {
|
||||
SWIG_define(SWIG_From(int), PyInt_FromLong)
|
||||
}
|
||||
|
||||
%fragment(SWIG_From_frag(long),"header") {
|
||||
SWIG_define(SWIG_From(long), PyInt_FromLong)
|
||||
}
|
||||
|
||||
%fragment(SWIG_From_frag(float),"header") {
|
||||
SWIG_define(SWIG_From(float), PyFloat_FromDouble)
|
||||
}
|
||||
|
||||
%fragment(SWIG_From_frag(double),"header") {
|
||||
SWIG_define(SWIG_From(double), PyFloat_FromDouble)
|
||||
}
|
||||
|
||||
/*
|
||||
Here, we have all the complex AsVal/From methods
|
||||
*/
|
||||
|
||||
%fragment("<limits.h>","header") %{
|
||||
#include <limits.h>
|
||||
%}
|
||||
|
|
@ -87,7 +111,7 @@ SWIGSTATICINLINE(int)
|
|||
if (value > max_value) {
|
||||
if (errmsg) {
|
||||
PyErr_Format(PyExc_OverflowError,
|
||||
"value %ld is greater than '%s' minimum %ld",
|
||||
"value %lud is greater than '%s' minimum %lud",
|
||||
value, errmsg, max_value);
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue