lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


#define FILE_1 1
#define FILE_2 2

int current_file;

current_file = FILE_1;
lua_dofile(L1, "file_1")
current_file = FILE_2;
lua_dofile(L2, "file_1")

int my_c_function(lua_State *L)
{
    if (current_file == FILE_1)
      printf("file 1 made the call");
   else if (current_file == FILE_2)
      printf("file 2 made the call");
}