Merge branch 'master' into devel

Conflicts:
	.travis.yml
	Examples/test-suite/common.mk
This commit is contained in:
Oliver Buchtala 2014-03-30 23:07:56 +02:00
commit 158c8b6732
114 changed files with 2861 additions and 1708 deletions

View file

@ -65,7 +65,6 @@
%typemap(javacode) enum SWIGTYPE ""
%typemap(javaimports) enum SWIGTYPE ""
%typemap(javainterfaces) enum SWIGTYPE ""
%typemap(javabody) enum SWIGTYPE ""
/*
* SwigNext static inner class used instead of a static int as static fields cannot be accessed from enum initialisers.

View file

@ -64,7 +64,6 @@
%typemap(javacode) enum SWIGTYPE ""
%typemap(javaimports) enum SWIGTYPE ""
%typemap(javainterfaces) enum SWIGTYPE ""
%typemap(javabody) enum SWIGTYPE ""
/*
* The swigToEnum method is used to find the Java enum from a C++ enum integer value. The default one here takes

View file

@ -643,7 +643,7 @@ SWIGINTERN void SWIG_Lua_add_namespace_classes(lua_State *L, swig_lua_namespace
when function is called).
Function always returns newly registered table on top of the stack.
*/
SWIGINTERN int SWIG_Lua_namespace_register(lua_State *L, swig_lua_namespace *ns, int reg)
SWIGINTERN void SWIG_Lua_namespace_register(lua_State *L, swig_lua_namespace *ns, int reg)
{
/* 1 argument - table on the top of the stack */
int begin = lua_gettop(L);
@ -960,8 +960,8 @@ SWIGINTERN int SWIG_Lua_class_set(lua_State *L)
lua_error(L);
} else {
assert(ret==0);
return 0;
}
return 0;
}
/* the class.destruct method called by the interpreter */
@ -991,17 +991,14 @@ SWIGINTERN int SWIG_Lua_class_tostring(lua_State *L)
/* there should be 1 param passed in
(1) userdata (not the metatable) */
assert(lua_isuserdata(L,1)); /* just in case */
unsigned long userData = (unsigned long)lua_touserdata(L,1); /* get the userdata address for later */
void* userData = lua_touserdata(L,1); /* get the userdata address for later */
lua_getmetatable(L,1); /* get the meta table */
assert(lua_istable(L,-1)); /* just in case */
lua_getfield(L, -1, ".type");
const char *className = lua_tostring(L, -1);
char output[256];
snprintf(output, 255, "<%s userdata: %lX>", className, userData);
lua_pushstring(L, (const char*)output);
lua_pushfstring(L, "<%s userdata: %p>", className, userData);
return 1;
}

View file

@ -12,6 +12,8 @@ SWIGINTERNINLINE PyObject*
}
}
#ifdef SWIG_PYTHON_LEGACY_BOOL
// Default prior to SWIG 3.0.0
%fragment(SWIG_AsVal_frag(bool),"header",
fragment=SWIG_AsVal_frag(long)) {
SWIGINTERN int
@ -24,6 +26,23 @@ SWIG_AsVal_dec(bool)(PyObject *obj, bool *val)
return SWIG_OK;
}
}
#else
%fragment(SWIG_AsVal_frag(bool),"header",
fragment=SWIG_AsVal_frag(long)) {
SWIGINTERN int
SWIG_AsVal_dec(bool)(PyObject *obj, bool *val)
{
int r;
if (!PyBool_Check(obj))
return SWIG_ERROR;
r = PyObject_IsTrue(obj);
if (r == -1)
return SWIG_ERROR;
if (val) *val = r ? true : false;
return SWIG_OK;
}
}
#endif
/* int */

View file

@ -5,9 +5,11 @@
/* ------------------------------------------------------------
* Fragment section
* ------------------------------------------------------------ */
/* bool is dangerous in Python, change precedence */
#ifdef SWIG_PYTHON_LEGACY_BOOL
// Default prior to SWIG 3.0.0
#undef SWIG_TYPECHECK_BOOL
%define SWIG_TYPECHECK_BOOL 10000 %enddef
#endif
/* Include fundamental fragment definitions */
%include <typemaps/fragments.swg>

View file

@ -11,7 +11,7 @@
* utility methods for wchar_t strings
* ------------------------------------------------------------ */
%fragment("SWIG_AsWCharPtrAndSize","header",fragment="<wchar.h>",fragment="SWIG_pwchar_descriptor") {
%fragment("SWIG_AsWCharPtrAndSize","header",fragment="<wchar.h>",fragment="SWIG_pwchar_descriptor",fragment="SWIG_AsCharPtrAndSize") {
SWIGINTERN int
SWIG_AsWCharPtrAndSize(VALUE obj, wchar_t **cptr, size_t *psize, int *alloc)
{
@ -50,7 +50,7 @@ SWIG_AsWCharPtrAndSize(VALUE obj, wchar_t **cptr, size_t *psize, int *alloc)
}
}
%fragment("SWIG_FromWCharPtrAndSize","header",fragment="<wchar.h>",fragment="SWIG_pwchar_descriptor") {
%fragment("SWIG_FromWCharPtrAndSize","header",fragment="<wchar.h>",fragment="SWIG_pwchar_descriptor",fragment="SWIG_FromCharPtrAndSize") {
SWIGINTERNINLINE VALUE
SWIG_FromWCharPtrAndSize(const wchar_t * carray, size_t size)
{

View file

@ -159,7 +159,7 @@
%typemap(memberin) SWIGTYPE [ANY] {
if ($input) {
size_t ii = 0;
for (; ii < (size_t)$1_dim0; ++ii) *($1_ltype)&$1[ii] = ($*1_ltype)$input[ii];
for (; ii < (size_t)$1_dim0; ++ii) *($1_basetype *)&$1[ii] = *(($1_basetype *)$input + ii);
} else {
%variable_nullref("$type","$name");
}
@ -168,7 +168,7 @@
%typemap(globalin) SWIGTYPE [ANY] {
if ($input) {
size_t ii = 0;
for (; ii < (size_t)$1_dim0; ++ii) *($1_ltype)&$1[ii] = ($*1_ltype)$input[ii];
for (; ii < (size_t)$1_dim0; ++ii) *($1_basetype *)&$1[ii] = *(($1_basetype *)$input + ii);
} else {
%variable_nullref("$type","$name");
}
@ -181,7 +181,7 @@
%variable_fail(res, "$type", "$name");
} else if (inp) {
size_t ii = 0;
for (; ii < (size_t)$1_dim0; ++ii) *($1_ltype)&$1[ii] = ($*1_ltype)inp[ii];
for (; ii < (size_t)$1_dim0; ++ii) *($1_basetype *)&$1[ii] = *(($1_basetype *)inp + ii);
} else {
%variable_nullref("$type", "$name");
}