Language:
C     Change language:
Pastebin: 92234
Author: Anonymous
Subject: Untitled
Created: 2008-07-22 17:05:28
Download and save
Toggle line numbers
1void lua_pgeMath_init(lua_State *L) 
2
3    lua_getglobal(L, "pge"); 
4    lua_newtable(L); 
5    luaL_register(L, 0, lua_pgeMath_functions); 
6    lua_setfield(L, -2, "math"); /* pge */ 
7    lua_pop(L, 1); 
8
9 
10void lua_pgeWhatever_init(lua_State *L) 
11
12    lua_getglobal(L, "pge"); 
13    lua_newtable(L); 
14    luaL_register(L, 0, lua_pgeWhatever_methods); 
15    luaL_newmetatable(L, "Whatever"
16    luaL_register(L, 0, lua_pgeWhatever_meta); 
17    lua_pushliteral(L, "__index"); 
18    lua_pushvalue(L, -3); 
19    lua_rawset(L, -3); 
20    lua_pushliteral(L, "__metatable"); 
21    lua_pushvalue(L, -3); 
22    lua_rawset(L, -3); 
23    lua_pop(L, 1); 
24    lua_setfield(L, -2, "whatever"); /* pge */ 
25    lua_pop(L, 1); 
26
Thread:
[92234] Untitled by Anonymous at 2008-07-22 17:05:28
Tip: Click the line numbers to toggle highliting on that line.

Paste followup:

Language:
Author:
Subject:


    Tabstop:     bigger biggest
Note: You can prefix a line with "@@@" to highlight it.