comparison lib/swig/swigwin-2.0.11/Lib/lua/luarun.swg @ 2037:7a9477135943

Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous) Added custom pre-compile build step (.swig -> .cxx)
author Nomad
date Fri, 22 Nov 2013 10:34:22 +0200
parents b3009adc0e2f
children
comparison
equal deleted inserted replaced
2036:a453996ed5ac 2037:7a9477135943
3 * 3 *
4 * This file contains the runtime support for Lua modules 4 * This file contains the runtime support for Lua modules
5 * and includes code for managing global variables and pointer 5 * and includes code for managing global variables and pointer
6 * type checking. 6 * type checking.
7 * ----------------------------------------------------------------------------- */ 7 * ----------------------------------------------------------------------------- */
8 8
9 #include "lib/lua/lua.h"
9 #ifdef __cplusplus 10 #ifdef __cplusplus
10 extern "C" { 11 extern "C" {
11 #endif 12 #endif
12 13
13 #include "lua.h" 14 //#include "lua.h"
14 #include "lauxlib.h" 15 //#include "lauxlib.h"
15 #include <stdlib.h> /* for malloc */ 16 #include <stdlib.h> /* for malloc */
16 #include <assert.h> /* for a few sanity tests */ 17 #include <assert.h> /* for a few sanity tests */
17 18
18 /* ----------------------------------------------------------------------------- 19 /* -----------------------------------------------------------------------------
19 * Lua flavors 20 * Lua flavors
498 499
499 SWIGINTERN void SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]); // forward declaration 500 SWIGINTERN void SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]); // forward declaration
500 SWIGINTERN void SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn); // forward declaration 501 SWIGINTERN void SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn); // forward declaration
501 502
502 /* helper function - register namespace methods and attributes into namespace */ 503 /* helper function - register namespace methods and attributes into namespace */
503 SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State* L, swig_lua_namespace* ns) 504 SWIGINTERN void SWIG_Lua_add_namespace_details(lua_State* L, swig_lua_namespace* ns)
504 { 505 {
505 int i = 0; 506 int i = 0;
506 assert(lua_istable(L,-1)); 507 assert(lua_istable(L,-1));
507 /* There must be table at the top of the stack */ 508 /* There must be table at the top of the stack */
508 SWIG_Lua_InstallConstants(L, ns->ns_constants); 509 SWIG_Lua_InstallConstants(L, ns->ns_constants);
526 lua_pop(L,1); 527 lua_pop(L,1);
527 528
528 } 529 }
529 530
530 /* helper function. creates namespace table and add it to module table */ 531 /* helper function. creates namespace table and add it to module table */
531 SWIGINTERN int SWIG_Lua_namespace_register(lua_State* L, swig_lua_namespace* ns) 532 SWIGINTERN void SWIG_Lua_namespace_register(lua_State* L, swig_lua_namespace* ns)
532 { 533 {
533 assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table */ 534 assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table */
534 lua_checkstack(L,5); 535 lua_checkstack(L,5);
535 lua_pushstring(L, ns->name); 536 lua_pushstring(L, ns->name);
536 lua_newtable(L); /* namespace itself */ 537 lua_newtable(L); /* namespace itself */