mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
make style (linux)
This commit is contained in:
parent
dbc730468a
commit
59667e5d1b
16 changed files with 4007 additions and 4125 deletions
|
@ -323,7 +323,8 @@ static int CmdParadoxSim(const char *Cmd) {
|
|||
if (resp.status != PM3_EOPABORTED)
|
||||
return resp.status;
|
||||
|
||||
return PM3_SUCCESS;}
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
/*
|
||||
|
||||
if (sscanf(Cmd, "%u %u", &fc, &cn) != 2) return usage_lf_paradox_sim();
|
||||
|
|
|
@ -502,8 +502,7 @@ SWIG_TypePrettyName(const swig_type_info *type) {
|
|||
for (s = type->str; *s; s++)
|
||||
if (*s == '|') last_name = s + 1;
|
||||
return last_name;
|
||||
}
|
||||
else
|
||||
} else
|
||||
return type->name;
|
||||
}
|
||||
|
||||
|
@ -916,8 +915,7 @@ typedef struct swig_elua_entry {
|
|||
prefixed with the location of the innermost Lua call-point
|
||||
(as formatted by luaL_where). */
|
||||
SWIGRUNTIME void
|
||||
SWIG_Lua_pusherrstring (lua_State *L, const char *str)
|
||||
{
|
||||
SWIG_Lua_pusherrstring(lua_State *L, const char *str) {
|
||||
luaL_where(L, 1);
|
||||
lua_pushstring(L, str);
|
||||
lua_concat(L, 2);
|
||||
|
@ -927,8 +925,7 @@ SWIG_Lua_pusherrstring (lua_State *L, const char *str)
|
|||
the Lua stack, like lua_pushfstring, but prefixed with the
|
||||
location of the innermost Lua call-point (as formatted by luaL_where). */
|
||||
SWIGRUNTIME void
|
||||
SWIG_Lua_pushferrstring (lua_State *L, const char *fmt, ...)
|
||||
{
|
||||
SWIG_Lua_pushferrstring(lua_State *L, const char *fmt, ...) {
|
||||
va_list argp;
|
||||
va_start(argp, fmt);
|
||||
luaL_where(L, 1);
|
||||
|
@ -1106,8 +1103,7 @@ SWIG_Lua_SetModule(lua_State *L, swig_module_info *module) {
|
|||
/* this function is called when trying to set an immutable.
|
||||
default action is to print an error.
|
||||
This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */
|
||||
SWIGINTERN int SWIG_Lua_set_immutable(lua_State *L)
|
||||
{
|
||||
SWIGINTERN int SWIG_Lua_set_immutable(lua_State *L) {
|
||||
/* there should be 1 param passed in: the new value */
|
||||
#ifndef SWIGLUA_IGNORE_SET_IMMUTABLE
|
||||
lua_pop(L, 1); /* remove it */
|
||||
|
@ -1123,8 +1119,7 @@ SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_t
|
|||
static int swig_lua_elua_emulate_unique_key;
|
||||
|
||||
/* This function emulates eLua rotables behaviour. It loads a rotable definition into the usual lua table. */
|
||||
SWIGINTERN void SWIG_Lua_elua_emulate_register(lua_State *L, const swig_elua_entry *table)
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_elua_emulate_register(lua_State *L, const swig_elua_entry *table) {
|
||||
int i, table_parsed, parsed_tables_array, target_table;
|
||||
assert(lua_istable(L, -1));
|
||||
target_table = lua_gettop(L);
|
||||
|
@ -1141,8 +1136,7 @@ SWIGINTERN void SWIG_Lua_elua_emulate_register(lua_State *L, const swig_elua_ent
|
|||
lua_rawsetp(L, parsed_tables_array, table);
|
||||
table_parsed = 0;
|
||||
const int SWIGUNUSED pairs_start = lua_gettop(L);
|
||||
for(i = 0;table[i].key.type != LUA_TNIL || table[i].value.type != LUA_TNIL;i++)
|
||||
{
|
||||
for (i = 0; table[i].key.type != LUA_TNIL || table[i].value.type != LUA_TNIL; i++) {
|
||||
const swig_elua_entry *entry = table + i;
|
||||
int is_metatable = 0;
|
||||
switch (entry->key.type) {
|
||||
|
@ -1207,16 +1201,14 @@ SWIGINTERN void SWIG_Lua_elua_emulate_register(lua_State *L, const swig_elua_ent
|
|||
assert(lua_gettop(L) == target_table);
|
||||
}
|
||||
|
||||
SWIGINTERN void SWIG_Lua_elua_emulate_register_clear(lua_State *L)
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_elua_emulate_register_clear(lua_State *L) {
|
||||
lua_pushnil(L);
|
||||
lua_rawsetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key);
|
||||
}
|
||||
|
||||
SWIGINTERN void SWIG_Lua_get_class_registry(lua_State *L);
|
||||
|
||||
SWIGINTERN int SWIG_Lua_emulate_elua_getmetatable(lua_State *L)
|
||||
{
|
||||
SWIGINTERN int SWIG_Lua_emulate_elua_getmetatable(lua_State *L) {
|
||||
SWIG_check_num_args("getmetatable(SWIG eLua emulation)", 1, 1);
|
||||
SWIG_Lua_get_class_registry(L);
|
||||
lua_getfield(L, -1, "lua_getmetatable");
|
||||
|
@ -1241,8 +1233,7 @@ fail:
|
|||
return 0;
|
||||
}
|
||||
|
||||
SWIGINTERN void SWIG_Lua_emulate_elua_swap_getmetatable(lua_State *L)
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_emulate_elua_swap_getmetatable(lua_State *L) {
|
||||
SWIG_Lua_get_class_registry(L);
|
||||
lua_pushglobaltable(L);
|
||||
lua_pushstring(L, "lua_getmetatable");
|
||||
|
@ -1262,8 +1253,7 @@ SWIGINTERN void SWIG_Lua_emulate_elua_swap_getmetatable(lua_State *L)
|
|||
* global variable support code: namespaces and modules (which are the same thing)
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
SWIGINTERN int SWIG_Lua_namespace_get(lua_State *L)
|
||||
{
|
||||
SWIGINTERN int SWIG_Lua_namespace_get(lua_State *L) {
|
||||
/* there should be 2 params passed in
|
||||
(1) table (not the meta table)
|
||||
(2) string name of the attribute
|
||||
|
@ -1277,8 +1267,8 @@ SWIGINTERN int SWIG_Lua_namespace_get(lua_State *L)
|
|||
lua_pushvalue(L, 2); /* key */
|
||||
lua_rawget(L, -2);
|
||||
lua_remove(L, -2); /* stack tidy, remove .get table */
|
||||
if (lua_iscfunction(L,-1))
|
||||
{ /* found it so call the fn & return its value */
|
||||
if (lua_iscfunction(L, -1)) {
|
||||
/* found it so call the fn & return its value */
|
||||
lua_call(L, 0, 1); /* 1 value in (userdata),1 out (result) */
|
||||
lua_remove(L, -2); /* stack tidy, remove metatable */
|
||||
return 1;
|
||||
|
@ -1290,8 +1280,8 @@ SWIGINTERN int SWIG_Lua_namespace_get(lua_State *L)
|
|||
lua_pushvalue(L, 2); /* key */
|
||||
lua_rawget(L, -2); /* look for the fn */
|
||||
lua_remove(L, -2); /* stack tidy, remove .fn table */
|
||||
if (lua_isfunction(L,-1)) /* note: whether it's a C function or lua function */
|
||||
{ /* found it so return the fn & let lua call it */
|
||||
if (lua_isfunction(L, -1)) { /* note: whether it's a C function or lua function */
|
||||
/* found it so return the fn & let lua call it */
|
||||
lua_remove(L, -2); /* stack tidy, remove metatable */
|
||||
return 1;
|
||||
}
|
||||
|
@ -1299,8 +1289,7 @@ SWIGINTERN int SWIG_Lua_namespace_get(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
SWIGINTERN int SWIG_Lua_namespace_set(lua_State *L)
|
||||
{
|
||||
SWIGINTERN int SWIG_Lua_namespace_set(lua_State *L) {
|
||||
/* there should be 3 params passed in
|
||||
(1) table (not the meta table)
|
||||
(2) string name of the attribute
|
||||
|
@ -1312,13 +1301,12 @@ SWIGINTERN int SWIG_Lua_namespace_set(lua_State *L)
|
|||
assert(lua_istable(L, -1));
|
||||
|
||||
SWIG_Lua_get_table(L, ".set"); /* find the .set table */
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
if (lua_istable(L, -1)) {
|
||||
/* look for the key in the .set table */
|
||||
lua_pushvalue(L, 2); /* key */
|
||||
lua_rawget(L, -2);
|
||||
if (lua_iscfunction(L,-1))
|
||||
{ /* found it so call the fn & return its value */
|
||||
if (lua_iscfunction(L, -1)) {
|
||||
/* found it so call the fn & return its value */
|
||||
lua_pushvalue(L, 3); /* value */
|
||||
lua_call(L, 1, 0);
|
||||
return 0;
|
||||
|
@ -1337,8 +1325,7 @@ SWIGINTERN void SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFuncti
|
|||
SWIGINTERN void SWIG_Lua_class_register(lua_State *L, swig_lua_class *clss);
|
||||
|
||||
/* helper function - register namespace methods and attributes into namespace */
|
||||
SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State *L, swig_lua_namespace *ns)
|
||||
{
|
||||
SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State *L, swig_lua_namespace *ns) {
|
||||
int i;
|
||||
/* There must be namespace table (not metatable) at the top of the stack */
|
||||
assert(lua_istable(L, -1));
|
||||
|
@ -1361,8 +1348,7 @@ SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State *L, swig_lua_namespace *
|
|||
}
|
||||
|
||||
/* Register all classes in the namespace */
|
||||
SWIGINTERN void SWIG_Lua_add_namespace_classes(lua_State *L, swig_lua_namespace *ns)
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_add_namespace_classes(lua_State *L, swig_lua_namespace *ns) {
|
||||
swig_lua_class **classes;
|
||||
|
||||
/* There must be a module/namespace table at the top of the stack */
|
||||
|
@ -1383,8 +1369,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 void 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) {
|
||||
swig_lua_namespace **sub_namespace;
|
||||
/* 1 argument - table on the top of the stack */
|
||||
const int SWIGUNUSED begin = lua_gettop(L);
|
||||
|
@ -1444,8 +1429,7 @@ SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L,const char *cname);
|
|||
typedef int (*swig_lua_base_iterator_func)(lua_State *, swig_type_info *, int, int *ret);
|
||||
|
||||
SWIGINTERN int SWIG_Lua_iterate_bases(lua_State *L, swig_type_info *SWIGUNUSED swig_type,
|
||||
int first_arg, swig_lua_base_iterator_func func, int *const ret)
|
||||
{
|
||||
int first_arg, swig_lua_base_iterator_func func, int *const ret) {
|
||||
/* first_arg - position of the object in stack. Everything that is above are arguments
|
||||
* and is passed to every evocation of the func */
|
||||
int last_arg = lua_gettop(L);/* position of last argument */
|
||||
|
@ -1476,8 +1460,7 @@ SWIGINTERN int SWIG_Lua_iterate_bases(lua_State *L, swig_type_info * SWIGUNUSED
|
|||
|
||||
if (ret)
|
||||
*ret = 0;
|
||||
if(bases_count>0)
|
||||
{
|
||||
if (bases_count > 0) {
|
||||
int to_remove;
|
||||
size_t i;
|
||||
int j;
|
||||
|
@ -1543,8 +1526,7 @@ SWIGINTERN int SWIG_Lua_iterate_bases(lua_State *L, swig_type_info * SWIGUNUSED
|
|||
* 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)
|
||||
{
|
||||
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
|
||||
|
@ -1559,8 +1541,8 @@ SWIGINTERN int SWIG_Lua_class_do_get_item(lua_State *L, swig_type_info *type, i
|
|||
/* 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 */
|
||||
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) */
|
||||
|
@ -1581,8 +1563,7 @@ SWIGINTERN int SWIG_Lua_class_do_get_item(lua_State *L, swig_type_info *type, i
|
|||
* 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(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
|
||||
{
|
||||
SWIGINTERN int SWIG_Lua_class_do_get(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
|
||||
|
@ -1600,8 +1581,8 @@ SWIGINTERN int SWIG_Lua_class_do_get(lua_State *L, swig_type_info *type, int SW
|
|||
lua_pushvalue(L, substack_start + 2); /* key */
|
||||
lua_rawget(L, -2);
|
||||
lua_remove(L, -2); /* stack tidy, remove .get table */
|
||||
if (lua_iscfunction(L,-1))
|
||||
{ /* found it so call the fn & return its value */
|
||||
if (lua_iscfunction(L, -1)) {
|
||||
/* found it so call the fn & return its value */
|
||||
lua_pushvalue(L, substack_start + 1); /* the userdata */
|
||||
lua_call(L, 1, 1); /* 1 value in (userdata),1 out (result) */
|
||||
lua_remove(L, -2); /* stack tidy, remove metatable */
|
||||
|
@ -1616,8 +1597,8 @@ SWIGINTERN int SWIG_Lua_class_do_get(lua_State *L, swig_type_info *type, int SW
|
|||
lua_pushvalue(L, substack_start + 2); /* key */
|
||||
lua_rawget(L, -2); /* look for the fn */
|
||||
lua_remove(L, -2); /* stack tidy, remove .fn table */
|
||||
if (lua_isfunction(L,-1)) /* note: if its a C function or lua function */
|
||||
{ /* found it so return the fn & let lua call it */
|
||||
if (lua_isfunction(L, -1)) { /* note: if its a C function or lua function */
|
||||
/* found it so return the fn & let lua call it */
|
||||
lua_remove(L, -2); /* stack tidy, remove metatable */
|
||||
if (ret)
|
||||
*ret = 1;
|
||||
|
@ -1633,8 +1614,7 @@ SWIGINTERN int SWIG_Lua_class_do_get(lua_State *L, swig_type_info *type, int SW
|
|||
|
||||
/* the class.get method, performs the lookup of class attributes
|
||||
*/
|
||||
SWIGINTERN int SWIG_Lua_class_get(lua_State *L)
|
||||
{
|
||||
SWIGINTERN int SWIG_Lua_class_get(lua_State *L) {
|
||||
/* there should be 2 params passed in
|
||||
(1) userdata (not the meta table)
|
||||
(2) string name of the attribute
|
||||
|
@ -1660,8 +1640,7 @@ SWIGINTERN int SWIG_Lua_class_get(lua_State *L)
|
|||
/* helper for the class.set method, performs the lookup of class attributes
|
||||
* It returns error code. Number of function return values is passed inside 'ret'
|
||||
*/
|
||||
SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int first_arg, int *ret)
|
||||
{
|
||||
SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int first_arg, int *ret) {
|
||||
/* there should be 3 params passed in
|
||||
(1) table (not the meta table)
|
||||
(2) string name of the attribute
|
||||
|
@ -1678,14 +1657,13 @@ SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int fi
|
|||
*ret = 0; /* it is setter - number of return values is always 0 */
|
||||
|
||||
SWIG_Lua_get_table(L, ".set"); /* find the .set table */
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
if (lua_istable(L, -1)) {
|
||||
/* look for the key in the .set table */
|
||||
lua_pushvalue(L, substack_start + 2); /* key */
|
||||
lua_rawget(L, -2);
|
||||
lua_remove(L, -2); /* tidy stack, remove .set table */
|
||||
if (lua_iscfunction(L,-1))
|
||||
{ /* found it so call the fn & return its value */
|
||||
if (lua_iscfunction(L, -1)) {
|
||||
/* found it so call the fn & return its value */
|
||||
lua_pushvalue(L, substack_start + 1); /* userdata */
|
||||
lua_pushvalue(L, substack_start + 3); /* value */
|
||||
lua_call(L, 2, 0);
|
||||
|
@ -1699,8 +1677,8 @@ SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int fi
|
|||
/* NEW: looks for the __setitem() fn
|
||||
this is a user provided set fn */
|
||||
SWIG_Lua_get_table(L, "__setitem"); /* find the fn */
|
||||
if (lua_iscfunction(L,-1)) /* if its there */
|
||||
{ /* found it so call the fn & return its value */
|
||||
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_pushvalue(L, substack_start + 3); /* the value */
|
||||
|
@ -1722,8 +1700,7 @@ SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int fi
|
|||
/* This is the actual method exported to Lua. It calls SWIG_Lua_class_do_set and correctly
|
||||
* handles return values.
|
||||
*/
|
||||
SWIGINTERN int SWIG_Lua_class_set(lua_State *L)
|
||||
{
|
||||
SWIGINTERN int SWIG_Lua_class_set(lua_State *L) {
|
||||
/* There should be 3 params passed in
|
||||
(1) table (not the meta table)
|
||||
(2) string name of the attribute
|
||||
|
@ -1747,8 +1724,7 @@ SWIGINTERN int SWIG_Lua_class_set(lua_State *L)
|
|||
}
|
||||
|
||||
/* the class.destruct method called by the interpreter */
|
||||
SWIGINTERN int SWIG_Lua_class_destruct(lua_State *L)
|
||||
{
|
||||
SWIGINTERN int SWIG_Lua_class_destruct(lua_State *L) {
|
||||
/* there should be 1 params passed in
|
||||
(1) userdata (not the meta table) */
|
||||
swig_lua_userdata *usr;
|
||||
|
@ -1756,11 +1732,9 @@ SWIGINTERN int SWIG_Lua_class_destruct(lua_State *L)
|
|||
assert(lua_isuserdata(L, -1)); /* just in case */
|
||||
usr = (swig_lua_userdata *)lua_touserdata(L, -1); /* get it */
|
||||
/* if must be destroyed & has a destructor */
|
||||
if (usr->own) /* if must be destroyed */
|
||||
{
|
||||
if (usr->own) { /* if must be destroyed */
|
||||
clss = (swig_lua_class *)usr->type->clientdata; /* get the class */
|
||||
if (clss && clss->destructor) /* there is a destroy fn */
|
||||
{
|
||||
if (clss && clss->destructor) { /* there is a destroy fn */
|
||||
clss->destructor(usr->ptr); /* bye bye */
|
||||
}
|
||||
}
|
||||
|
@ -1768,8 +1742,7 @@ SWIGINTERN int SWIG_Lua_class_destruct(lua_State *L)
|
|||
}
|
||||
|
||||
/* the class.__tostring method called by the interpreter and print */
|
||||
SWIGINTERN int SWIG_Lua_class_tostring(lua_State *L)
|
||||
{
|
||||
SWIGINTERN int SWIG_Lua_class_tostring(lua_State *L) {
|
||||
/* there should be 1 param passed in
|
||||
(1) userdata (not the metatable) */
|
||||
swig_lua_userdata *userData;
|
||||
|
@ -1781,8 +1754,7 @@ SWIGINTERN int SWIG_Lua_class_tostring(lua_State *L)
|
|||
}
|
||||
|
||||
/* to manually disown some userdata */
|
||||
SWIGINTERN int SWIG_Lua_class_disown(lua_State *L)
|
||||
{
|
||||
SWIGINTERN int SWIG_Lua_class_disown(lua_State *L) {
|
||||
/* there should be 1 params passed in
|
||||
(1) userdata (not the meta table) */
|
||||
swig_lua_userdata *usr;
|
||||
|
@ -1796,8 +1768,7 @@ SWIGINTERN int SWIG_Lua_class_disown(lua_State *L)
|
|||
/* lua callable function to compare userdata's value
|
||||
the issue is that two userdata may point to the same thing
|
||||
but to lua, they are different objects */
|
||||
SWIGRUNTIME int SWIG_Lua_class_equal(lua_State *L)
|
||||
{
|
||||
SWIGRUNTIME int SWIG_Lua_class_equal(lua_State *L) {
|
||||
int result;
|
||||
swig_lua_userdata *usr1, *usr2;
|
||||
if (!lua_isuserdata(L, 1) || !lua_isuserdata(L, 2)) /* just in case */
|
||||
|
@ -1811,8 +1782,7 @@ SWIGRUNTIME int SWIG_Lua_class_equal(lua_State *L)
|
|||
}
|
||||
|
||||
/* populate table at the top of the stack with metamethods that ought to be inherited */
|
||||
SWIGINTERN void SWIG_Lua_populate_inheritable_metamethods(lua_State *L)
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_populate_inheritable_metamethods(lua_State *L) {
|
||||
SWIG_Lua_add_boolean(L, "__add", 1);
|
||||
SWIG_Lua_add_boolean(L, "__sub", 1);
|
||||
SWIG_Lua_add_boolean(L, "__mul", 1);
|
||||
|
@ -1831,8 +1801,7 @@ SWIGINTERN void SWIG_Lua_populate_inheritable_metamethods(lua_State *L)
|
|||
}
|
||||
|
||||
/* creates the swig registry */
|
||||
SWIGINTERN void SWIG_Lua_create_class_registry(lua_State *L)
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_create_class_registry(lua_State *L) {
|
||||
/* create main SWIG registry table */
|
||||
lua_pushstring(L, "SWIG");
|
||||
lua_newtable(L);
|
||||
|
@ -1855,13 +1824,12 @@ SWIGINTERN void SWIG_Lua_create_class_registry(lua_State *L)
|
|||
}
|
||||
|
||||
/* gets the swig registry (or creates it) */
|
||||
SWIGINTERN void SWIG_Lua_get_class_registry(lua_State *L)
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_get_class_registry(lua_State *L) {
|
||||
/* add this all into the swig registry: */
|
||||
lua_pushstring(L, "SWIG");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX); /* get the registry */
|
||||
if (!lua_istable(L,-1)) /* not there */
|
||||
{ /* must be first time, so add it */
|
||||
if (!lua_istable(L, -1)) { /* not there */
|
||||
/* must be first time, so add it */
|
||||
lua_pop(L, 1); /* remove the result */
|
||||
SWIG_Lua_create_class_registry(L);
|
||||
/* then get it */
|
||||
|
@ -1870,8 +1838,7 @@ SWIGINTERN void SWIG_Lua_get_class_registry(lua_State *L)
|
|||
}
|
||||
}
|
||||
|
||||
SWIGINTERN void SWIG_Lua_get_inheritable_metamethods(lua_State *L)
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_get_inheritable_metamethods(lua_State *L) {
|
||||
SWIG_Lua_get_class_registry(L);
|
||||
lua_pushstring(L, ".library");
|
||||
lua_rawget(L, -2);
|
||||
|
@ -1885,8 +1852,7 @@ SWIGINTERN void SWIG_Lua_get_inheritable_metamethods(lua_State *L)
|
|||
}
|
||||
|
||||
/* Helper function to get the classes metatable from the register */
|
||||
SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L,const char *cname)
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L, const char *cname) {
|
||||
SWIG_Lua_get_class_registry(L); /* get the registry */
|
||||
lua_pushstring(L, cname); /* get the name */
|
||||
lua_rawget(L, -2); /* get it */
|
||||
|
@ -1900,14 +1866,11 @@ It cannot be done at compile time, as this will not work with hireachies
|
|||
spread over more than one swig file.
|
||||
Therefore it must be done at runtime, querying the SWIG type system.
|
||||
*/
|
||||
SWIGINTERN void SWIG_Lua_init_base_class(lua_State *L,swig_lua_class *clss)
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_init_base_class(lua_State *L, swig_lua_class *clss) {
|
||||
int i = 0;
|
||||
swig_module_info *module = SWIG_GetModule(L);
|
||||
for(i=0;clss->base_names[i];i++)
|
||||
{
|
||||
if (clss->bases[i]==0) /* not found yet */
|
||||
{
|
||||
for (i = 0; clss->base_names[i]; i++) {
|
||||
if (clss->bases[i] == 0) { /* not found yet */
|
||||
/* lookup and cache the base class */
|
||||
swig_type_info *info = SWIG_TypeQueryModule(module, module, clss->base_names[i]);
|
||||
if (info) clss->bases[i] = (swig_lua_class *) info->clientdata;
|
||||
|
@ -1917,8 +1880,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 void 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);
|
||||
while (lua_next(L, source) != 0) {
|
||||
|
@ -1933,8 +1895,7 @@ SWIGINTERN void SWIG_Lua_merge_tables_by_index(lua_State *L, int target, int sou
|
|||
}
|
||||
|
||||
/* Merges two tables with given name. original - index of target metatable, base - index of source metatable */
|
||||
SWIGINTERN void 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);
|
||||
lua_rawget(L, original);
|
||||
|
@ -1948,8 +1909,7 @@ SWIGINTERN void SWIG_Lua_merge_tables(lua_State *L, const char* name, int origin
|
|||
}
|
||||
|
||||
/* Function takes all symbols from base and adds it to derived class. It's just a helper. */
|
||||
SWIGINTERN void 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));
|
||||
int original = lua_gettop(L);
|
||||
|
@ -1962,12 +1922,10 @@ SWIGINTERN void SWIG_Lua_class_squash_base(lua_State *L, swig_lua_class *base_cl
|
|||
}
|
||||
|
||||
/* Function squashes all symbols from 'clss' bases into itself */
|
||||
SWIGINTERN void 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);
|
||||
for(i=0;clss->base_names[i];i++)
|
||||
{
|
||||
for (i = 0; clss->base_names[i]; i++) {
|
||||
if (clss->bases[i] == 0) /* Somehow it's not found. Skip it */
|
||||
continue;
|
||||
/* Thing is: all bases are already registered. Thus they have already executed
|
||||
|
@ -1982,15 +1940,13 @@ SWIGINTERN void SWIG_Lua_class_squash_bases(lua_State *L, swig_lua_class *clss)
|
|||
|
||||
#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */
|
||||
/* helper add a variable to a registered class */
|
||||
SWIGINTERN void SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFunction getFn,lua_CFunction setFn)
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_add_variable(lua_State *L, const char *name, lua_CFunction getFn, lua_CFunction setFn) {
|
||||
assert(lua_istable(L, -1)); /* just in case */
|
||||
SWIG_Lua_get_table(L, ".get"); /* find the .get table */
|
||||
assert(lua_istable(L, -1)); /* just in case */
|
||||
SWIG_Lua_add_function(L, name, getFn);
|
||||
lua_pop(L, 1); /* tidy stack (remove table) */
|
||||
if (setFn)
|
||||
{
|
||||
if (setFn) {
|
||||
SWIG_Lua_get_table(L, ".set"); /* find the .set table */
|
||||
assert(lua_istable(L, -1)); /* just in case */
|
||||
SWIG_Lua_add_function(L, name, setFn);
|
||||
|
@ -1999,14 +1955,12 @@ SWIGINTERN void SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFuncti
|
|||
}
|
||||
|
||||
/* helper to recursively add class static details (static attributes, operations and constants) */
|
||||
SWIGINTERN void SWIG_Lua_add_class_static_details(lua_State *L, swig_lua_class *clss)
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_add_class_static_details(lua_State *L, swig_lua_class *clss) {
|
||||
int i = 0;
|
||||
/* The class namespace table must be on the top of the stack */
|
||||
assert(lua_istable(L, -1));
|
||||
/* call all the base classes first: we can then override these later: */
|
||||
for(i=0;clss->bases[i];i++)
|
||||
{
|
||||
for (i = 0; clss->bases[i]; i++) {
|
||||
SWIG_Lua_add_class_static_details(L, clss->bases[i]);
|
||||
}
|
||||
|
||||
|
@ -2016,15 +1970,13 @@ SWIGINTERN void SWIG_Lua_add_class_static_details(lua_State *L, swig_lua_class *
|
|||
SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss); /* forward declaration */
|
||||
|
||||
/* helper to recursively add class details (attributes & operations) */
|
||||
SWIGINTERN void SWIG_Lua_add_class_instance_details(lua_State *L, swig_lua_class *clss)
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_add_class_instance_details(lua_State *L, swig_lua_class *clss) {
|
||||
int i;
|
||||
size_t bases_count = 0;
|
||||
/* Add bases to .bases table */
|
||||
SWIG_Lua_get_table(L, ".bases");
|
||||
assert(lua_istable(L, -1)); /* just in case */
|
||||
for(i=0;clss->bases[i];i++)
|
||||
{
|
||||
for (i = 0; clss->bases[i]; i++) {
|
||||
SWIG_Lua_get_class_metatable(L, clss->bases[i]->fqname);
|
||||
/* Base class must be already registered */
|
||||
assert(lua_istable(L, -1));
|
||||
|
@ -2088,8 +2040,7 @@ SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L); /*forward declaration
|
|||
* SWIG_Lua_resolve_metamethod
|
||||
* */
|
||||
SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class *clss, int metamethod_name_idx,
|
||||
int skip_check)
|
||||
{
|
||||
int skip_check) {
|
||||
/* This function is called recursively */
|
||||
int result = 0;
|
||||
int i = 0;
|
||||
|
@ -2110,8 +2061,7 @@ SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class
|
|||
}
|
||||
|
||||
/* Forwarding calls to bases */
|
||||
for(i=0;clss->bases[i];i++)
|
||||
{
|
||||
for (i = 0; clss->bases[i]; i++) {
|
||||
result = SWIG_Lua_do_resolve_metamethod(L, clss->bases[i], metamethod_name_idx, 0);
|
||||
if (result)
|
||||
break;
|
||||
|
@ -2122,8 +2072,7 @@ SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class
|
|||
|
||||
/* The proxy function for metamethod. All parameters are passed as cclosure. Searches for actual method
|
||||
* and calls it */
|
||||
SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L)
|
||||
{
|
||||
SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L) {
|
||||
int numargs;
|
||||
int metamethod_name_idx;
|
||||
const swig_lua_class *clss;
|
||||
|
@ -2159,8 +2108,7 @@ SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L)
|
|||
* Returns 1 if successfully added, 0 if not added because no base class has it, -1
|
||||
* if method is defined in the class metatable itself
|
||||
*/
|
||||
SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *clss, const int metatable_index)
|
||||
{
|
||||
SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *clss, const int metatable_index) {
|
||||
int key_index;
|
||||
int success = 0;
|
||||
int i = 0;
|
||||
|
@ -2180,8 +2128,7 @@ SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *
|
|||
lua_pop(L, 1);
|
||||
|
||||
/* Iterating over immediate bases */
|
||||
for(i=0;clss->bases[i];i++)
|
||||
{
|
||||
for (i = 0; clss->bases[i]; i++) {
|
||||
const swig_lua_class *base = clss->bases[i];
|
||||
SWIG_Lua_get_class_metatable(L, base->fqname);
|
||||
lua_pushvalue(L, key_index);
|
||||
|
@ -2207,8 +2154,7 @@ SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *
|
|||
return success;
|
||||
}
|
||||
|
||||
SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss)
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss) {
|
||||
int metatable_index;
|
||||
int metamethods_info_index;
|
||||
int tostring_undefined;
|
||||
|
@ -2264,8 +2210,7 @@ SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class
|
|||
}
|
||||
|
||||
/* Register class static methods,attributes etc as well as constructor proxy */
|
||||
SWIGINTERN void SWIG_Lua_class_register_static(lua_State *L, swig_lua_class *clss)
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_class_register_static(lua_State *L, swig_lua_class *clss) {
|
||||
const int SWIGUNUSED begin = lua_gettop(L);
|
||||
lua_checkstack(L, 5); /* just in case */
|
||||
assert(lua_istable(L, -1)); /* just in case */
|
||||
|
@ -2279,8 +2224,7 @@ SWIGINTERN void SWIG_Lua_class_register_static(lua_State *L, swig_lua_class *cls
|
|||
so you can do MyClass(...) as well as new_MyClass(...)
|
||||
BUT only if a constructor is defined
|
||||
(this overcomes the problem of pure virtual classes without constructors)*/
|
||||
if (clss->constructor)
|
||||
{
|
||||
if (clss->constructor) {
|
||||
lua_getmetatable(L, -1);
|
||||
assert(lua_istable(L, -1)); /* just in case */
|
||||
SWIG_Lua_add_function(L, "__call", clss->constructor);
|
||||
|
@ -2298,8 +2242,7 @@ SWIGINTERN void SWIG_Lua_class_register_static(lua_State *L, swig_lua_class *cls
|
|||
/* Performs the instance (non-static) class registration process. Metatable for class is created
|
||||
* and added to the class registry.
|
||||
*/
|
||||
SWIGINTERN void SWIG_Lua_class_register_instance(lua_State *L,swig_lua_class *clss)
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_class_register_instance(lua_State *L, swig_lua_class *clss) {
|
||||
const int SWIGUNUSED begin = lua_gettop(L);
|
||||
int i;
|
||||
/* if name already there (class is already registered) then do nothing */
|
||||
|
@ -2313,8 +2256,7 @@ SWIGINTERN void SWIG_Lua_class_register_instance(lua_State *L,swig_lua_class *c
|
|||
}
|
||||
lua_pop(L, 2); /* tidy stack */
|
||||
/* Recursively initialize all bases */
|
||||
for(i=0;clss->bases[i];i++)
|
||||
{
|
||||
for (i = 0; clss->bases[i]; i++) {
|
||||
SWIG_Lua_class_register_instance(L, clss->bases[i]);
|
||||
}
|
||||
/* Again, get registry and push name */
|
||||
|
@ -2328,8 +2270,7 @@ SWIGINTERN void SWIG_Lua_class_register_instance(lua_State *L,swig_lua_class *c
|
|||
*/
|
||||
{
|
||||
int new_metatable_index = lua_absindex(L, -1);
|
||||
for(i=0;clss->bases[i];i++)
|
||||
{
|
||||
for (i = 0; clss->bases[i]; i++) {
|
||||
int base_metatable;
|
||||
SWIG_Lua_get_class_metatable(L, clss->bases[i]->fqname);
|
||||
base_metatable = lua_absindex(L, -1);
|
||||
|
@ -2380,8 +2321,7 @@ SWIGINTERN void SWIG_Lua_class_register_instance(lua_State *L,swig_lua_class *c
|
|||
assert(lua_gettop(L) == begin);
|
||||
}
|
||||
|
||||
SWIGINTERN void SWIG_Lua_class_register(lua_State *L,swig_lua_class *clss)
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_class_register(lua_State *L, swig_lua_class *clss) {
|
||||
int SWIGUNUSED begin;
|
||||
assert(lua_istable(L, -1)); /* This is a table (module or namespace) where classes will be added */
|
||||
SWIG_Lua_class_register_instance(L, clss);
|
||||
|
@ -2418,8 +2358,7 @@ SWIGINTERN void SWIG_Lua_class_register(lua_State *L,swig_lua_class *clss)
|
|||
#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */
|
||||
|
||||
#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
|
||||
SWIGINTERN void SWIG_Lua_elua_class_register_instance(lua_State *L, swig_lua_class *clss)
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_elua_class_register_instance(lua_State *L, swig_lua_class *clss) {
|
||||
const int SWIGUNUSED begin = lua_gettop(L);
|
||||
int i;
|
||||
/* if name already there (class is already registered) then do nothing */
|
||||
|
@ -2433,8 +2372,7 @@ SWIGINTERN void SWIG_Lua_elua_class_register_instance(lua_State *L, swig_lua_cla
|
|||
}
|
||||
lua_pop(L, 2); /* tidy stack */
|
||||
/* Recursively initialize all bases */
|
||||
for(i=0;clss->bases[i];i++)
|
||||
{
|
||||
for (i = 0; clss->bases[i]; i++) {
|
||||
SWIG_Lua_elua_class_register_instance(L, clss->bases[i]);
|
||||
}
|
||||
/* Again, get registry and push name */
|
||||
|
@ -2453,25 +2391,19 @@ SWIGINTERN void SWIG_Lua_elua_class_register_instance(lua_State *L, swig_lua_cla
|
|||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
/* helper to add metatable to new lua object */
|
||||
SWIGINTERN void SWIG_Lua_AddMetatable(lua_State *L,swig_type_info *type)
|
||||
{
|
||||
if (type->clientdata) /* there is clientdata: so add the metatable */
|
||||
{
|
||||
SWIGINTERN void SWIG_Lua_AddMetatable(lua_State *L, swig_type_info *type) {
|
||||
if (type->clientdata) { /* there is clientdata: so add the metatable */
|
||||
SWIG_Lua_get_class_metatable(L, ((swig_lua_class *)(type->clientdata))->fqname);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
if (lua_istable(L, -1)) {
|
||||
lua_setmetatable(L, -2);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* pushes a new object into the lua stack */
|
||||
SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *type, int own)
|
||||
{
|
||||
SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L, void *ptr, swig_type_info *type, int own) {
|
||||
swig_lua_userdata *usr;
|
||||
if (!ptr) {
|
||||
lua_pushnil(L);
|
||||
|
@ -2488,31 +2420,25 @@ SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *t
|
|||
|
||||
/* takes a object from the lua stack & converts it into an object of the correct type
|
||||
(if possible) */
|
||||
SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State *L,int index,void **ptr,swig_type_info *type,int flags)
|
||||
{
|
||||
SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State *L, int index, void **ptr, swig_type_info *type, int flags) {
|
||||
swig_lua_userdata *usr;
|
||||
swig_cast_info *cast;
|
||||
/* special case: lua nil => NULL pointer */
|
||||
if (lua_isnil(L,index))
|
||||
{
|
||||
if (lua_isnil(L, index)) {
|
||||
*ptr = 0;
|
||||
return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
|
||||
}
|
||||
usr = (swig_lua_userdata *)lua_touserdata(L, index); /* get data */
|
||||
if (usr)
|
||||
{
|
||||
if (flags & SWIG_POINTER_DISOWN) /* must disown the object */
|
||||
{
|
||||
if (usr) {
|
||||
if (flags & SWIG_POINTER_DISOWN) { /* must disown the object */
|
||||
usr->own = 0;
|
||||
}
|
||||
if (!type) /* special cast void*, no casting fn */
|
||||
{
|
||||
if (!type) { /* special cast void*, no casting fn */
|
||||
*ptr = usr->ptr;
|
||||
return SWIG_OK; /* ok */
|
||||
}
|
||||
cast = SWIG_TypeCheckStruct(usr->type, type); /* performs normal type checking */
|
||||
if (cast)
|
||||
{
|
||||
if (cast) {
|
||||
int newmemory = 0;
|
||||
*ptr = SWIG_TypeCast(cast, usr->ptr, &newmemory);
|
||||
assert(!newmemory); /* newmemory handling not yet implemented */
|
||||
|
@ -2533,8 +2459,7 @@ SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State *L,int index,swig_type_info *typ
|
|||
}
|
||||
|
||||
/* pushes a packed userdata. user for member fn pointers only */
|
||||
SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_type_info *type)
|
||||
{
|
||||
SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L, void *ptr, size_t size, swig_type_info *type) {
|
||||
swig_lua_rawdata *raw;
|
||||
assert(ptr); /* not acceptable to pass in a NULL value */
|
||||
raw = (swig_lua_rawdata *)lua_newuserdata(L, sizeof(swig_lua_rawdata) - 1 + size); /* alloc data */
|
||||
|
@ -2545,13 +2470,11 @@ SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_t
|
|||
}
|
||||
|
||||
/* converts a packed userdata. user for member fn pointers only */
|
||||
SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State *L,int index,void *ptr,size_t size,swig_type_info *type)
|
||||
{
|
||||
SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State *L, int index, void *ptr, size_t size, swig_type_info *type) {
|
||||
swig_lua_rawdata *raw;
|
||||
raw = (swig_lua_rawdata *)lua_touserdata(L, index); /* get data */
|
||||
if (!raw) return SWIG_ERROR; /* error */
|
||||
if (type==0 || type==raw->type) /* void* or identical type */
|
||||
{
|
||||
if (type == 0 || type == raw->type) { /* void* or identical type */
|
||||
memcpy(ptr, raw->data, size); /* copy it */
|
||||
return SWIG_OK; /* ok */
|
||||
}
|
||||
|
@ -2559,11 +2482,9 @@ SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State *L,int index,void *ptr,size_t
|
|||
}
|
||||
|
||||
/* a function to get the typestring of a piece of data */
|
||||
SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp)
|
||||
{
|
||||
SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp) {
|
||||
swig_lua_userdata *usr;
|
||||
if (lua_isuserdata(L,tp))
|
||||
{
|
||||
if (lua_isuserdata(L, tp)) {
|
||||
usr = (swig_lua_userdata *)lua_touserdata(L, tp); /* get data */
|
||||
if (usr && usr->type && usr->type->str)
|
||||
return usr->type->str;
|
||||
|
@ -2573,8 +2494,7 @@ SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp)
|
|||
}
|
||||
|
||||
/* lua callable function to get the userdata's type */
|
||||
SWIGRUNTIME int SWIG_Lua_type(lua_State *L)
|
||||
{
|
||||
SWIGRUNTIME int SWIG_Lua_type(lua_State *L) {
|
||||
lua_pushstring(L, SWIG_Lua_typename(L, 1));
|
||||
return 1;
|
||||
}
|
||||
|
@ -2723,7 +2643,8 @@ static int _wrap_new_pm3__SWIG_0(lua_State* L) {
|
|||
|
||||
SWIG_check_num_args("pm3::pm3", 0, 0)
|
||||
result = (pm3 *)new_pm3__SWIG_0();
|
||||
SWIG_NewPointerObj(L,result,SWIGTYPE_p_pm3,1); SWIG_arg++;
|
||||
SWIG_NewPointerObj(L, result, SWIGTYPE_p_pm3, 1);
|
||||
SWIG_arg++;
|
||||
return SWIG_arg;
|
||||
|
||||
if (0) SWIG_fail;
|
||||
|
@ -2743,7 +2664,8 @@ static int _wrap_new_pm3__SWIG_1(lua_State* L) {
|
|||
if (!SWIG_lua_isnilstring(L, 1)) SWIG_fail_arg("pm3::pm3", 1, "char *");
|
||||
arg1 = (char *)lua_tostring(L, 1);
|
||||
result = (pm3 *)new_pm3__SWIG_1(arg1);
|
||||
SWIG_NewPointerObj(L,result,SWIGTYPE_p_pm3,1); SWIG_arg++;
|
||||
SWIG_NewPointerObj(L, result, SWIGTYPE_p_pm3, 1);
|
||||
SWIG_arg++;
|
||||
return SWIG_arg;
|
||||
|
||||
if (0) SWIG_fail;
|
||||
|
@ -2778,7 +2700,8 @@ static int _wrap_new_pm3(lua_State* L) {
|
|||
" Possible C/C++ prototypes are:\n"
|
||||
" pm3::pm3()\n"
|
||||
" pm3::pm3(char *)\n");
|
||||
lua_error(L);return 0;
|
||||
lua_error(L);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2798,7 +2721,8 @@ static int _wrap_pm3_console(lua_State* L) {
|
|||
|
||||
arg2 = (char *)lua_tostring(L, 2);
|
||||
result = (int)pm3_console(arg1, arg2);
|
||||
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
||||
lua_pushnumber(L, (lua_Number) result);
|
||||
SWIG_arg++;
|
||||
return SWIG_arg;
|
||||
|
||||
if (0) SWIG_fail;
|
||||
|
@ -2822,7 +2746,8 @@ static int _wrap_pm3_name_get(lua_State* L) {
|
|||
}
|
||||
|
||||
result = (char *)pm3_name_get(arg1);
|
||||
lua_pushstring(L,(const char *)result); SWIG_arg++;
|
||||
lua_pushstring(L, (const char *)result);
|
||||
SWIG_arg++;
|
||||
return SWIG_arg;
|
||||
|
||||
if (0) SWIG_fail;
|
||||
|
@ -3154,7 +3079,8 @@ SWIG_PropagateClientData(void) {
|
|||
|
||||
#ifdef __cplusplus
|
||||
#if 0
|
||||
{ /* c-mode */
|
||||
{
|
||||
/* c-mode */
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -3251,8 +3177,7 @@ SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
|
|||
const char *SWIG_LUACODE =
|
||||
"";
|
||||
|
||||
void SWIG_init_user(lua_State* L)
|
||||
{
|
||||
void SWIG_init_user(lua_State *L) {
|
||||
/* exec Lua code if applicable */
|
||||
SWIG_Lua_dostring(L, SWIG_LUACODE);
|
||||
}
|
||||
|
|
|
@ -516,8 +516,7 @@ SWIG_TypePrettyName(const swig_type_info *type) {
|
|||
for (s = type->str; *s; s++)
|
||||
if (*s == '|') last_name = s + 1;
|
||||
return last_name;
|
||||
}
|
||||
else
|
||||
} else
|
||||
return type->name;
|
||||
}
|
||||
|
||||
|
@ -782,8 +781,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|||
* so please call SWIG_Python_str_DelForPy3(x) to free the space.
|
||||
*/
|
||||
SWIGINTERN char *
|
||||
SWIG_Python_str_AsChar(PyObject *str)
|
||||
{
|
||||
SWIG_Python_str_AsChar(PyObject *str) {
|
||||
#if PY_VERSION_HEX >= 0x03000000
|
||||
char *newstr = 0;
|
||||
str = PyUnicode_AsUTF8String(str);
|
||||
|
@ -809,8 +807,7 @@ SWIG_Python_str_AsChar(PyObject *str)
|
|||
|
||||
|
||||
SWIGINTERN PyObject *
|
||||
SWIG_Python_str_FromChar(const char *c)
|
||||
{
|
||||
SWIG_Python_str_FromChar(const char *c) {
|
||||
#if PY_VERSION_HEX >= 0x03000000
|
||||
return PyUnicode_FromString(c);
|
||||
#else
|
||||
|
@ -882,8 +879,7 @@ SWIG_Python_ErrorType(int code) {
|
|||
|
||||
|
||||
SWIGRUNTIME void
|
||||
SWIG_Python_AddErrorMsg(const char* mesg)
|
||||
{
|
||||
SWIG_Python_AddErrorMsg(const char *mesg) {
|
||||
PyObject *type = 0;
|
||||
PyObject *value = 0;
|
||||
PyObject *traceback = 0;
|
||||
|
@ -908,8 +904,7 @@ SWIG_Python_AddErrorMsg(const char* mesg)
|
|||
}
|
||||
|
||||
SWIGRUNTIME int
|
||||
SWIG_Python_TypeErrorOccurred(PyObject *obj)
|
||||
{
|
||||
SWIG_Python_TypeErrorOccurred(PyObject *obj) {
|
||||
PyObject *error;
|
||||
if (obj)
|
||||
return 0;
|
||||
|
@ -918,8 +913,7 @@ SWIG_Python_TypeErrorOccurred(PyObject *obj)
|
|||
}
|
||||
|
||||
SWIGRUNTIME void
|
||||
SWIG_Python_RaiseOrModifyTypeError(const char *message)
|
||||
{
|
||||
SWIG_Python_RaiseOrModifyTypeError(const char *message) {
|
||||
if (SWIG_Python_TypeErrorOccurred(NULL)) {
|
||||
/* Use existing TypeError to preserve stacktrace and enhance with given message */
|
||||
PyObject *newvalue;
|
||||
|
@ -1174,8 +1168,7 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
|
|||
/* Unpack the argument tuple */
|
||||
|
||||
SWIGINTERN Py_ssize_t
|
||||
SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
|
||||
{
|
||||
SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) {
|
||||
if (!args) {
|
||||
if (!min && !max) {
|
||||
return 1;
|
||||
|
@ -1252,8 +1245,7 @@ extern "C" {
|
|||
/* The python void return value */
|
||||
|
||||
SWIGRUNTIMEINLINE PyObject *
|
||||
SWIG_Py_Void(void)
|
||||
{
|
||||
SWIG_Py_Void(void) {
|
||||
PyObject *none = Py_None;
|
||||
Py_INCREF(none);
|
||||
return none;
|
||||
|
@ -1272,8 +1264,7 @@ typedef struct {
|
|||
} SwigPyClientData;
|
||||
|
||||
SWIGRUNTIMEINLINE int
|
||||
SWIG_Python_CheckImplicit(swig_type_info *ty)
|
||||
{
|
||||
SWIG_Python_CheckImplicit(swig_type_info *ty) {
|
||||
SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
|
||||
int fail = data ? data->implicitconv : 0;
|
||||
if (fail)
|
||||
|
@ -1290,8 +1281,7 @@ SWIG_Python_ExceptionType(swig_type_info *desc) {
|
|||
|
||||
|
||||
SWIGRUNTIME SwigPyClientData *
|
||||
SwigPyClientData_New(PyObject* obj)
|
||||
{
|
||||
SwigPyClientData_New(PyObject *obj) {
|
||||
if (!obj) {
|
||||
return 0;
|
||||
} else {
|
||||
|
@ -1359,8 +1349,7 @@ typedef struct {
|
|||
#ifdef SWIGPYTHON_BUILTIN
|
||||
|
||||
SWIGRUNTIME PyObject *
|
||||
SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
|
||||
{
|
||||
SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) {
|
||||
SwigPyObject *sobj = (SwigPyObject *)v;
|
||||
|
||||
if (!sobj->dict)
|
||||
|
@ -1373,14 +1362,12 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
|
|||
#endif
|
||||
|
||||
SWIGRUNTIME PyObject *
|
||||
SwigPyObject_long(SwigPyObject *v)
|
||||
{
|
||||
SwigPyObject_long(SwigPyObject *v) {
|
||||
return PyLong_FromVoidPtr(v->ptr);
|
||||
}
|
||||
|
||||
SWIGRUNTIME PyObject *
|
||||
SwigPyObject_format(const char* fmt, SwigPyObject *v)
|
||||
{
|
||||
SwigPyObject_format(const char *fmt, SwigPyObject *v) {
|
||||
PyObject *res = NULL;
|
||||
PyObject *args = PyTuple_New(1);
|
||||
if (args) {
|
||||
|
@ -1401,20 +1388,17 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v)
|
|||
}
|
||||
|
||||
SWIGRUNTIME PyObject *
|
||||
SwigPyObject_oct(SwigPyObject *v)
|
||||
{
|
||||
SwigPyObject_oct(SwigPyObject *v) {
|
||||
return SwigPyObject_format("%o", v);
|
||||
}
|
||||
|
||||
SWIGRUNTIME PyObject *
|
||||
SwigPyObject_hex(SwigPyObject *v)
|
||||
{
|
||||
SwigPyObject_hex(SwigPyObject *v) {
|
||||
return SwigPyObject_format("%x", v);
|
||||
}
|
||||
|
||||
SWIGRUNTIME PyObject *
|
||||
SwigPyObject_repr(SwigPyObject *v)
|
||||
{
|
||||
SwigPyObject_repr(SwigPyObject *v) {
|
||||
const char *name = SWIG_TypePrettyName(v->ty);
|
||||
PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
|
||||
if (v->next) {
|
||||
|
@ -1434,14 +1418,12 @@ SwigPyObject_repr(SwigPyObject *v)
|
|||
/* We need a version taking two PyObject* parameters so it's a valid
|
||||
* PyCFunction to use in swigobject_methods[]. */
|
||||
SWIGRUNTIME PyObject *
|
||||
SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
|
||||
{
|
||||
SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) {
|
||||
return SwigPyObject_repr((SwigPyObject *)v);
|
||||
}
|
||||
|
||||
SWIGRUNTIME int
|
||||
SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
|
||||
{
|
||||
SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) {
|
||||
void *i = v->ptr;
|
||||
void *j = w->ptr;
|
||||
return (i < j) ? -1 : ((i > j) ? 1 : 0);
|
||||
|
@ -1449,8 +1431,7 @@ SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
|
|||
|
||||
/* Added for Python 3.x, would it also be useful for Python 2.x? */
|
||||
SWIGRUNTIME PyObject *
|
||||
SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
|
||||
{
|
||||
SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) {
|
||||
PyObject *res;
|
||||
if (op != Py_EQ && op != Py_NE) {
|
||||
Py_INCREF(Py_NotImplemented);
|
||||
|
@ -1499,8 +1480,7 @@ SWIGRUNTIME PyObject *
|
|||
SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
|
||||
|
||||
SWIGRUNTIME void
|
||||
SwigPyObject_dealloc(PyObject *v)
|
||||
{
|
||||
SwigPyObject_dealloc(PyObject *v) {
|
||||
SwigPyObject *sobj = (SwigPyObject *) v;
|
||||
PyObject *next = sobj->next;
|
||||
if (sobj->own == SWIG_POINTER_OWN) {
|
||||
|
@ -1550,8 +1530,7 @@ SwigPyObject_dealloc(PyObject *v)
|
|||
}
|
||||
|
||||
SWIGRUNTIME PyObject *
|
||||
SwigPyObject_append(PyObject* v, PyObject* next)
|
||||
{
|
||||
SwigPyObject_append(PyObject *v, PyObject *next) {
|
||||
SwigPyObject *sobj = (SwigPyObject *) v;
|
||||
if (!SwigPyObject_Check(next)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
|
||||
|
@ -1563,8 +1542,7 @@ SwigPyObject_append(PyObject* v, PyObject* next)
|
|||
}
|
||||
|
||||
SWIGRUNTIME PyObject *
|
||||
SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
|
||||
{
|
||||
SwigPyObject_next(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) {
|
||||
SwigPyObject *sobj = (SwigPyObject *) v;
|
||||
if (sobj->next) {
|
||||
Py_INCREF(sobj->next);
|
||||
|
@ -1575,24 +1553,21 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
|
|||
}
|
||||
|
||||
SWIGINTERN PyObject *
|
||||
SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
|
||||
{
|
||||
SwigPyObject_disown(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) {
|
||||
SwigPyObject *sobj = (SwigPyObject *)v;
|
||||
sobj->own = 0;
|
||||
return SWIG_Py_Void();
|
||||
}
|
||||
|
||||
SWIGINTERN PyObject *
|
||||
SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
|
||||
{
|
||||
SwigPyObject_acquire(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) {
|
||||
SwigPyObject *sobj = (SwigPyObject *)v;
|
||||
sobj->own = SWIG_POINTER_OWN;
|
||||
return SWIG_Py_Void();
|
||||
}
|
||||
|
||||
SWIGINTERN PyObject *
|
||||
SwigPyObject_own(PyObject *v, PyObject *args)
|
||||
{
|
||||
SwigPyObject_own(PyObject *v, PyObject *args) {
|
||||
PyObject *val = 0;
|
||||
if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
|
||||
return NULL;
|
||||
|
@ -1749,8 +1724,7 @@ SwigPyObject_TypeOnce(void) {
|
|||
}
|
||||
|
||||
SWIGRUNTIME PyObject *
|
||||
SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
|
||||
{
|
||||
SwigPyObject_New(void *ptr, swig_type_info *ty, int own) {
|
||||
SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
|
||||
if (sobj) {
|
||||
sobj->ptr = ptr;
|
||||
|
@ -1773,8 +1747,7 @@ typedef struct {
|
|||
} SwigPyPacked;
|
||||
|
||||
SWIGRUNTIME PyObject *
|
||||
SwigPyPacked_repr(SwigPyPacked *v)
|
||||
{
|
||||
SwigPyPacked_repr(SwigPyPacked *v) {
|
||||
char result[SWIG_BUFFER_SIZE];
|
||||
if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
|
||||
return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
|
||||
|
@ -1784,8 +1757,7 @@ SwigPyPacked_repr(SwigPyPacked *v)
|
|||
}
|
||||
|
||||
SWIGRUNTIME PyObject *
|
||||
SwigPyPacked_str(SwigPyPacked *v)
|
||||
{
|
||||
SwigPyPacked_str(SwigPyPacked *v) {
|
||||
char result[SWIG_BUFFER_SIZE];
|
||||
if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
|
||||
return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
|
||||
|
@ -1795,8 +1767,7 @@ SwigPyPacked_str(SwigPyPacked *v)
|
|||
}
|
||||
|
||||
SWIGRUNTIME int
|
||||
SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
|
||||
{
|
||||
SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) {
|
||||
size_t i = v->size;
|
||||
size_t j = w->size;
|
||||
int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
|
||||
|
@ -1818,8 +1789,7 @@ SwigPyPacked_Check(PyObject *op) {
|
|||
}
|
||||
|
||||
SWIGRUNTIME void
|
||||
SwigPyPacked_dealloc(PyObject *v)
|
||||
{
|
||||
SwigPyPacked_dealloc(PyObject *v) {
|
||||
if (SwigPyPacked_Check(v)) {
|
||||
SwigPyPacked *sobj = (SwigPyPacked *) v;
|
||||
free(sobj->pack);
|
||||
|
@ -1910,8 +1880,7 @@ SwigPyPacked_TypeOnce(void) {
|
|||
}
|
||||
|
||||
SWIGRUNTIME PyObject *
|
||||
SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
|
||||
{
|
||||
SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) {
|
||||
SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
|
||||
if (sobj) {
|
||||
void *pack = malloc(size);
|
||||
|
@ -1929,8 +1898,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
|
|||
}
|
||||
|
||||
SWIGRUNTIME swig_type_info *
|
||||
SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
|
||||
{
|
||||
SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) {
|
||||
if (SwigPyPacked_Check(obj)) {
|
||||
SwigPyPacked *sobj = (SwigPyPacked *)obj;
|
||||
if (sobj->size != size) return 0;
|
||||
|
@ -1948,8 +1916,7 @@ SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
|
|||
static PyObject *Swig_This_global = NULL;
|
||||
|
||||
SWIGRUNTIME PyObject *
|
||||
SWIG_This(void)
|
||||
{
|
||||
SWIG_This(void) {
|
||||
if (Swig_This_global == NULL)
|
||||
Swig_This_global = SWIG_Python_str_FromChar("this");
|
||||
return Swig_This_global;
|
||||
|
@ -1963,8 +1930,7 @@ SWIG_This(void)
|
|||
#endif
|
||||
|
||||
SWIGRUNTIME SwigPyObject *
|
||||
SWIG_Python_GetSwigThis(PyObject *pyobj)
|
||||
{
|
||||
SWIG_Python_GetSwigThis(PyObject *pyobj) {
|
||||
PyObject *obj;
|
||||
|
||||
if (SwigPyObject_Check(pyobj))
|
||||
|
@ -2201,8 +2167,7 @@ SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *t
|
|||
*/
|
||||
|
||||
SWIGRUNTIME PyObject *
|
||||
SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
|
||||
{
|
||||
SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) {
|
||||
PyObject *inst = 0;
|
||||
PyObject *newraw = data->newraw;
|
||||
if (newraw) {
|
||||
|
@ -2251,8 +2216,7 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
|
|||
}
|
||||
|
||||
SWIGRUNTIME void
|
||||
SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
|
||||
{
|
||||
SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) {
|
||||
PyObject *dict;
|
||||
#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
|
||||
PyObject **dictptr = _PyObject_GetDictPtr(inst);
|
||||
|
@ -2376,8 +2340,7 @@ SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
|
|||
}
|
||||
|
||||
SWIGRUNTIME void
|
||||
SWIG_Python_DestroyModule(PyObject *obj)
|
||||
{
|
||||
SWIG_Python_DestroyModule(PyObject *obj) {
|
||||
swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
|
||||
swig_type_info **types = swig_module->types;
|
||||
size_t i;
|
||||
|
@ -2417,8 +2380,7 @@ SWIG_Python_TypeCache(void) {
|
|||
}
|
||||
|
||||
SWIGRUNTIME swig_type_info *
|
||||
SWIG_Python_TypeQuery(const char *type)
|
||||
{
|
||||
SWIG_Python_TypeQuery(const char *type) {
|
||||
PyObject *cache = SWIG_Python_TypeCache();
|
||||
PyObject *key = SWIG_Python_str_FromChar(type);
|
||||
PyObject *obj = PyDict_GetItem(cache, key);
|
||||
|
@ -2446,8 +2408,7 @@ SWIG_Python_TypeQuery(const char *type)
|
|||
#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
|
||||
|
||||
SWIGRUNTIME int
|
||||
SWIG_Python_AddErrMesg(const char* mesg, int infront)
|
||||
{
|
||||
SWIG_Python_AddErrMesg(const char *mesg, int infront) {
|
||||
if (PyErr_Occurred()) {
|
||||
PyObject *type = 0;
|
||||
PyObject *value = 0;
|
||||
|
@ -2474,8 +2435,7 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront)
|
|||
}
|
||||
|
||||
SWIGRUNTIME int
|
||||
SWIG_Python_ArgFail(int argnum)
|
||||
{
|
||||
SWIG_Python_ArgFail(int argnum) {
|
||||
if (PyErr_Occurred()) {
|
||||
/* add information about failing argument */
|
||||
char mesg[256];
|
||||
|
@ -2487,16 +2447,14 @@ SWIG_Python_ArgFail(int argnum)
|
|||
}
|
||||
|
||||
SWIGRUNTIMEINLINE const char *
|
||||
SwigPyObject_GetDesc(PyObject *self)
|
||||
{
|
||||
SwigPyObject_GetDesc(PyObject *self) {
|
||||
SwigPyObject *v = (SwigPyObject *)self;
|
||||
swig_type_info *ty = v ? v->ty : 0;
|
||||
return ty ? ty->str : "";
|
||||
}
|
||||
|
||||
SWIGRUNTIME void
|
||||
SWIG_Python_TypeError(const char *type, PyObject *obj)
|
||||
{
|
||||
SWIG_Python_TypeError(const char *type, PyObject *obj) {
|
||||
if (type) {
|
||||
#if defined(SWIG_COBJECT_TYPES)
|
||||
if (obj && SwigPyObject_Check(obj)) {
|
||||
|
@ -2679,8 +2637,7 @@ SWIGINTERN pm3 *new_pm3__SWIG_0(void){
|
|||
}
|
||||
|
||||
SWIGINTERN swig_type_info *
|
||||
SWIG_pchar_descriptor(void)
|
||||
{
|
||||
SWIG_pchar_descriptor(void) {
|
||||
static int init = 0;
|
||||
static swig_type_info *info = 0;
|
||||
if (!init) {
|
||||
|
@ -2692,8 +2649,7 @@ SWIG_pchar_descriptor(void)
|
|||
|
||||
|
||||
SWIGINTERN int
|
||||
SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
|
||||
{
|
||||
SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) {
|
||||
#if PY_VERSION_HEX>=0x03000000
|
||||
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
|
||||
if (PyBytes_Check(obj))
|
||||
|
@ -2704,7 +2660,8 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
|
|||
if (PyString_Check(obj))
|
||||
#endif
|
||||
{
|
||||
char *cstr; Py_ssize_t len;
|
||||
char *cstr;
|
||||
Py_ssize_t len;
|
||||
int ret = SWIG_OK;
|
||||
#if PY_VERSION_HEX>=0x03000000
|
||||
#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
|
||||
|
@ -2760,7 +2717,8 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
|
|||
#endif
|
||||
#if PY_VERSION_HEX<0x03000000
|
||||
if (PyUnicode_Check(obj)) {
|
||||
char *cstr; Py_ssize_t len;
|
||||
char *cstr;
|
||||
Py_ssize_t len;
|
||||
if (!alloc && cptr) {
|
||||
return SWIG_RuntimeError;
|
||||
}
|
||||
|
@ -2816,15 +2774,13 @@ SWIGINTERN void delete_pm3(pm3 *self){
|
|||
}
|
||||
|
||||
SWIGINTERNINLINE PyObject *
|
||||
SWIG_From_int (int value)
|
||||
{
|
||||
SWIG_From_int(int value) {
|
||||
return PyInt_FromLong((long) value);
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE PyObject *
|
||||
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
|
||||
{
|
||||
SWIG_FromCharPtrAndSize(const char *carray, size_t size) {
|
||||
if (carray) {
|
||||
if (size > INT_MAX) {
|
||||
swig_type_info *pchar_descriptor = SWIG_pchar_descriptor();
|
||||
|
@ -2848,8 +2804,7 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
|
|||
|
||||
|
||||
SWIGINTERNINLINE PyObject *
|
||||
SWIG_FromCharPtr(const char *cptr)
|
||||
{
|
||||
SWIG_FromCharPtr(const char *cptr) {
|
||||
return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
|
||||
}
|
||||
|
||||
|
@ -3049,7 +3004,8 @@ static swig_cast_info *swig_cast_initial[] = {
|
|||
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
|
||||
|
||||
static swig_const_info swig_const_table[] = {
|
||||
{0, 0, 0, 0.0, 0, 0}};
|
||||
{0, 0, 0, 0.0, 0, 0}
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -732,7 +732,7 @@ Check column "offline" for their availability.
|
|||
|------- |------- |-----------
|
||||
|`lf keri help `|Y |`This help`
|
||||
|`lf keri demod `|Y |`Demodulate an KERI tag from the GraphBuffer`
|
||||
|`lf keri reader `|N |`Attempt to read and extract tag data from the antenna`
|
||||
|`lf keri read `|N |`Attempt to read and extract tag data from the antenna`
|
||||
|`lf keri clone `|N |`clone KERI tag to T55x7 or Q5/T5555`
|
||||
|`lf keri sim `|N |`simulate KERI tag`
|
||||
|
||||
|
@ -745,7 +745,7 @@ Check column "offline" for their availability.
|
|||
|------- |------- |-----------
|
||||
|`lf motorola help `|Y |`This help`
|
||||
|`lf motorola demod `|Y |`Demodulate an MOTOROLA tag from the GraphBuffer`
|
||||
|`lf motorola reader `|N |`Attempt to read and extract tag data from the antenna`
|
||||
|`lf motorola read `|N |`Attempt to read and extract tag data from the antenna`
|
||||
|`lf motorola clone `|N |`clone MOTOROLA tag to T55x7`
|
||||
|`lf motorola sim `|N |`simulate MOTOROLA tag`
|
||||
|
||||
|
@ -772,7 +772,7 @@ Check column "offline" for their availability.
|
|||
|------- |------- |-----------
|
||||
|`lf nexwatch help `|Y |`This help`
|
||||
|`lf nexwatch demod `|Y |`Demodulate a NexWatch tag (nexkey, quadrakey) from the GraphBuffer`
|
||||
|`lf nexwatch reader `|N |`Attempt to Read and Extract tag data from the antenna`
|
||||
|`lf nexwatch read `|N |`Attempt to Read and Extract tag data from the antenna`
|
||||
|`lf nexwatch clone `|N |`clone NexWatch tag to T55x7`
|
||||
|`lf nexwatch sim `|N |`simulate NexWatch tag`
|
||||
|
||||
|
@ -785,7 +785,7 @@ Check column "offline" for their availability.
|
|||
|------- |------- |-----------
|
||||
|`lf noralsy help `|Y |`This help`
|
||||
|`lf noralsy demod `|Y |`Demodulate an Noralsy tag from the GraphBuffer`
|
||||
|`lf noralsy reader `|N |`Attempt to read and extract tag data from the antenna`
|
||||
|`lf noralsy read `|N |`Attempt to read and extract tag data from the antenna`
|
||||
|`lf noralsy clone `|N |`clone Noralsy tag to T55x7 or Q5/T5555`
|
||||
|`lf noralsy sim `|N |`simulate Noralsy tag`
|
||||
|
||||
|
@ -798,7 +798,7 @@ Check column "offline" for their availability.
|
|||
|------- |------- |-----------
|
||||
|`lf pac help `|Y |`This help`
|
||||
|`lf pac demod `|Y |`Demodulate a PAC tag from the GraphBuffer`
|
||||
|`lf pac reader `|N |`Attempt to read and extract tag data from the antenna`
|
||||
|`lf pac read `|N |`Attempt to read and extract tag data from the antenna`
|
||||
|`lf pac clone `|N |`clone PAC tag to T55x7`
|
||||
|`lf pac sim `|N |`simulate PAC tag`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue