commit | author | age
|
6e1425
|
1 |
// |
H |
2 |
// wax_struct.h |
|
3 |
// Rentals |
|
4 |
// |
|
5 |
// Created by ProbablyInteractive on 7/7/09. |
|
6 |
// Copyright 2009 Probably Interactive. All rights reserved. |
|
7 |
// |
|
8 |
|
|
9 |
#import <Foundation/Foundation.h> |
|
10 |
//#import "lua.h" |
|
11 |
#import <lua/lua.h> |
|
12 |
|
|
13 |
#define WAX_STRUCT_METATABLE_NAME "wax.struct" |
|
14 |
|
|
15 |
typedef struct _wax_struct_userdata { |
|
16 |
void *data; |
|
17 |
int size; |
|
18 |
char *name; |
|
19 |
char *typeDescription; |
|
20 |
} wax_struct_userdata; |
|
21 |
|
|
22 |
int luaopen_wax_struct(lua_State *L); |
|
23 |
|
|
24 |
wax_struct_userdata *wax_struct_create(lua_State *L, const char *typeDescription, void *buffer); |
|
25 |
void wax_struct_pushValueAt(lua_State *L, wax_struct_userdata *structUserdata, int index); |
|
26 |
void wax_struct_setValueAt(lua_State *L, wax_struct_userdata *structUserdata, int index, int stackIndex); |
|
27 |
int wax_struct_getOffsetForName(lua_State *L, wax_struct_userdata *structUserdata, const char *name); |