This commit is contained in:
Brian West
2018-06-13 08:43:54 -05:00
committed by Muteesa Fred
parent a46cb42cdd
commit 70f21b8287
38 changed files with 8227 additions and 7805 deletions
+83 -36
View File
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.2
* Version 3.0.10
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
@@ -8,7 +8,11 @@
* interface file instead.
* ----------------------------------------------------------------------------- */
#ifndef SWIGLUA
#define SWIGLUA
#endif
#define SWIG_LUA_TARGET SWIG_LUA_FLAVOR_LUA
#define SWIG_LUA_MODULE_GLOBAL
@@ -103,9 +107,11 @@ template <typename T> T SwigValueInit() {
#endif
/* exporting methods */
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
# ifndef GCC_HASCLASSVISIBILITY
# define GCC_HASCLASSVISIBILITY
#if defined(__GNUC__)
# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
# ifndef GCC_HASCLASSVISIBILITY
# define GCC_HASCLASSVISIBILITY
# endif
# endif
#endif
@@ -144,6 +150,19 @@ template <typename T> T SwigValueInit() {
# define _SCL_SECURE_NO_DEPRECATE
#endif
/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
#endif
/* Intel's compiler complains if a variable which was never initialised is
* cast to void, which is a common idiom which we use to indicate that we
* are aware a variable isn't used. So we just silence that warning.
* See: https://github.com/swig/swig/issues/192 for more discussion.
*/
#ifdef __INTEL_COMPILER
# pragma warning disable 592
#endif
/* -----------------------------------------------------------------------------
* swigrun.swg
@@ -642,16 +661,16 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
char d = *(c++);
unsigned char uu;
if ((d >= '0') && (d <= '9'))
uu = ((d - '0') << 4);
uu = (unsigned char)((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f'))
uu = ((d - ('a'-10)) << 4);
uu = (unsigned char)((d - ('a'-10)) << 4);
else
return (char *) 0;
d = *(c++);
if ((d >= '0') && (d <= '9'))
uu |= (d - '0');
uu |= (unsigned char)(d - '0');
else if ((d >= 'a') && (d <= 'f'))
uu |= (d - ('a'-10));
uu |= (unsigned char)(d - ('a'-10));
else
return (char *) 0;
*u = uu;
@@ -1526,6 +1545,44 @@ SWIGINTERN int SWIG_Lua_iterate_bases(lua_State *L, swig_type_info * SWIGUNUSED
return result;
}
/* The class.get method helper, performs the lookup of class attributes.
* It returns an error code. Number of function return values is passed inside 'ret'.
* first_arg is not used in this function because function always has 2 arguments.
*/
SWIGINTERN int SWIG_Lua_class_do_get_item(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
{
/* there should be 2 params passed in
(1) userdata (not the meta table)
(2) string name of the attribute
*/
int bases_search_result;
int substack_start = lua_gettop(L)-2;
assert(first_arg == substack_start+1);
lua_checkstack(L,5);
assert(lua_isuserdata(L,-2)); /* just in case */
lua_getmetatable(L,-2); /* get the meta table */
assert(lua_istable(L,-1)); /* just in case */
/* NEW: looks for the __getitem() fn
this is a user provided get fn */
SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
if (lua_iscfunction(L,-1)) /* if its there */
{ /* found it so call the fn & return its value */
lua_pushvalue(L,substack_start+1); /* the userdata */
lua_pushvalue(L,substack_start+2); /* the parameter */
lua_call(L,2,1); /* 2 value in (userdata),1 out (result) */
lua_remove(L,-2); /* stack tidy, remove metatable */
if(ret) *ret = 1;
return SWIG_OK;
}
lua_pop(L,1);
/* Remove the metatable */
lua_pop(L,1);
/* Search in base classes */
bases_search_result = SWIG_Lua_iterate_bases(L,type,substack_start+1,SWIG_Lua_class_do_get_item,ret);
return bases_search_result; /* sorry not known */
}
/* The class.get method helper, performs the lookup of class attributes.
* It returns an error code. Number of function return values is passed inside 'ret'.
* first_arg is not used in this function because function always has 2 arguments.
@@ -1573,19 +1630,6 @@ SWIGINTERN int SWIG_Lua_class_do_get(lua_State *L, swig_type_info *type, int SW
return SWIG_OK;
}
lua_pop(L,1); /* remove whatever was there */
/* NEW: looks for the __getitem() fn
this is a user provided get fn */
SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
if (lua_iscfunction(L,-1)) /* if its there */
{ /* found it so call the fn & return its value */
lua_pushvalue(L,substack_start+1); /* the userdata */
lua_pushvalue(L,substack_start+2); /* the parameter */
lua_call(L,2,1); /* 2 value in (userdata),1 out (result) */
lua_remove(L,-2); /* stack tidy, remove metatable */
if(ret) *ret = 1;
return SWIG_OK;
}
lua_pop(L,1);
/* Remove the metatable */
lua_pop(L,1);
/* Search in base classes */
@@ -1612,6 +1656,10 @@ SWIGINTERN int SWIG_Lua_class_get(lua_State *L)
if(result == SWIG_OK)
return ret;
result = SWIG_Lua_class_do_get_item(L,type,1,&ret);
if(result == SWIG_OK)
return ret;
return 0;
}
@@ -1881,7 +1929,7 @@ SWIGINTERN void SWIG_Lua_init_base_class(lua_State *L,swig_lua_class *clss)
#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
/* Merges two tables */
SWIGINTERN int SWIG_Lua_merge_tables_by_index(lua_State *L, int target, int source)
SWIGINTERN void SWIG_Lua_merge_tables_by_index(lua_State *L, int target, int source)
{
/* iterating */
lua_pushnil(L);
@@ -1897,7 +1945,7 @@ SWIGINTERN int SWIG_Lua_merge_tables_by_index(lua_State *L, int target, int sour
}
/* Merges two tables with given name. original - index of target metatable, base - index of source metatable */
SWIGINTERN int SWIG_Lua_merge_tables(lua_State *L, const char* name, int original, int base)
SWIGINTERN void SWIG_Lua_merge_tables(lua_State *L, const char* name, int original, int base)
{
/* push original[name], then base[name] */
lua_pushstring(L,name);
@@ -1912,7 +1960,7 @@ SWIGINTERN int SWIG_Lua_merge_tables(lua_State *L, const char* name, int origina
}
/* Function takes all symbols from base and adds it to derived class. It's just a helper. */
SWIGINTERN int SWIG_Lua_class_squash_base(lua_State *L, swig_lua_class *base_cls)
SWIGINTERN void SWIG_Lua_class_squash_base(lua_State *L, swig_lua_class *base_cls)
{
/* There is one parameter - original, i.e. 'derived' class metatable */
assert(lua_istable(L,-1));
@@ -1926,7 +1974,7 @@ SWIGINTERN int SWIG_Lua_class_squash_base(lua_State *L, swig_lua_class *base_cls
}
/* Function squashes all symbols from 'clss' bases into itself */
SWIGINTERN int SWIG_Lua_class_squash_bases(lua_State *L, swig_lua_class *clss)
SWIGINTERN void SWIG_Lua_class_squash_bases(lua_State *L, swig_lua_class *clss)
{
int i;
SWIG_Lua_get_class_metatable(L,clss->fqname);
@@ -2551,7 +2599,7 @@ SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[]) {
switch(constants[i].type) {
case SWIG_LUA_INT:
lua_pushstring(L,constants[i].name);
lua_pushnumber(L,(lua_Number)constants[i].lvalue);
lua_pushinteger(L,(lua_Number)constants[i].lvalue);
lua_rawset(L,-3);
break;
case SWIG_LUA_FLOAT:
@@ -2561,7 +2609,10 @@ SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[]) {
break;
case SWIG_LUA_CHAR:
lua_pushstring(L,constants[i].name);
lua_pushfstring(L,"%c",(char)constants[i].lvalue);
{
char c = constants[i].lvalue;
lua_pushlstring(L,&c,1);
}
lua_rawset(L,-3);
break;
case SWIG_LUA_STRING:
@@ -3684,7 +3735,7 @@ static int _wrap_DTMF_digit_get(lua_State* L) {
}
result = (char) ((arg1)->digit);
lua_pushfstring(L,"%c",result); SWIG_arg++;
lua_pushlstring(L, &result, 1); SWIG_arg++;
return SWIG_arg;
if(0) SWIG_fail;
@@ -9688,7 +9739,7 @@ SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
size_t i;
swig_module_info *module_head, *iter;
int found, init;
int init;
/* check to see if the circular list has been setup, if not, set it up */
if (swig_module.next==0) {
@@ -9707,22 +9758,18 @@ SWIG_InitializeModule(void *clientdata) {
/* This is the first module loaded for this interpreter */
/* so set the swig module into the interpreter */
SWIG_SetModule(clientdata, &swig_module);
module_head = &swig_module;
} else {
/* the interpreter has loaded a SWIG module, but has it loaded this one? */
found=0;
iter=module_head;
do {
if (iter==&swig_module) {
found=1;
break;
/* Our module is already in the list, so there's nothing more to do. */
return;
}
iter=iter->next;
} while (iter!= module_head);
/* if the is found in the list, then all is done and we may leave */
if (found) return;
/* otherwise we must add out module into the list */
/* otherwise we must add our module into the list */
swig_module.next = module_head->next;
module_head->next = &swig_module;
}