annotate lua/luadc/luadc.c @ 32:2089026debae

- allowing 'None' as arg for pydc.load, effectively resulting in dlLoadLibrary(NULL), which is own process
author Tassilo Philipp
date Sat, 11 Apr 2020 18:02:33 +0200
parents 0cfcc391201f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
1 #include <lua.h>
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
2 #include <lauxlib.h>
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
3 #include <dyncall.h>
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
4 #include <dyncall_signature.h>
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
5 #include <dynload.h>
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
6
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
7 #define LUA_DCLIBNAME "dc"
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
8
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
9 DCCallVM* g_pCallVM;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
10
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
11 int luaDC_load(lua_State* L)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
12 {
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
13 void* handle;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
14 if (lua_gettop(L) != 1) return luaL_error(L,"wrong number of arguments");
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
15 handle = dlLoadLibrary( lua_tostring(L,1) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
16 if (!handle) return luaL_error(L,"library not found");
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
17 lua_pushlightuserdata(L, handle);
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
18 return 1;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
19 }
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
20
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
21 int luaDC_find(lua_State* L)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
22 {
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
23 void* h;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
24 const char* s;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
25 void* f;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
26 if (lua_gettop(L) != 2) return luaL_error(L,"wrong number of arguments");
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
27 h = lua_touserdata(L, 1);
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
28 s = lua_tostring(L, 2);
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
29 f = dlFindSymbol(h, s);
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
30 if (!f) return luaL_error(L,"symbol not found");
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
31 lua_pushlightuserdata(L, f);
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
32 return 1;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
33 }
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
34
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
35 int luaDC_mode(lua_State* L)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
36 {
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
37 if (lua_gettop(L) < 1) return luaL_error(L,"missing arguments");
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
38 dcMode(g_pCallVM, (DCint) lua_tonumber(L, 1) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
39 return 0;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
40 }
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
41
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
42 int luaDC_call(lua_State* L)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
43 {
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
44 void* f;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
45 const char* s;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
46 if (lua_gettop(L) < 2) return luaL_error(L,"missing arguments");
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
47
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
48 if ( lua_iscfunction(L,1) )
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
49 f = (void*) lua_tocfunction(L,1);
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
50 else if (lua_islightuserdata(L,1) )
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
51 f = lua_touserdata(L, 1);
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
52 else
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
53 return luaL_error(L,"argument #1 mismatch: expected userdata");
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
54
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
55 s = lua_tostring(L,2);
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
56
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
57 // dcMode( g_pCallVM, DC_CALL_C_DEFAULT );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
58 dcReset( g_pCallVM );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
59
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
60 char ch;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
61 int p = 3;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
62 while ( (ch = *s++) != DC_SIGCHAR_ENDARG)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
63 {
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
64 switch(ch)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
65 {
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
66 case DC_SIGCHAR_BOOL:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
67 dcArgBool(g_pCallVM, (DCbool) lua_toboolean(L, p) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
68 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
69 case DC_SIGCHAR_CHAR:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
70 dcArgChar(g_pCallVM, (DCchar) lua_tonumber(L, p) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
71 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
72 case DC_SIGCHAR_SHORT:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
73 dcArgShort(g_pCallVM, (DCshort) lua_tonumber(L, p) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
74 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
75 case DC_SIGCHAR_INT:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
76 dcArgInt(g_pCallVM, (DCint) lua_tonumber(L, p) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
77 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
78 case DC_SIGCHAR_LONG:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
79 dcArgLong(g_pCallVM, (DClong) lua_tonumber(L, p) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
80 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
81 case DC_SIGCHAR_LONGLONG:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
82 dcArgLongLong(g_pCallVM, (DClonglong) lua_tonumber(L, p) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
83 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
84 case DC_SIGCHAR_FLOAT:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
85 dcArgFloat(g_pCallVM, (DCfloat) lua_tonumber(L, p) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
86 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
87 case DC_SIGCHAR_DOUBLE:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
88 dcArgDouble(g_pCallVM, (DCdouble) lua_tonumber(L, p) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
89 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
90 case DC_SIGCHAR_POINTER:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
91 dcArgPointer(g_pCallVM, (DCpointer) lua_topointer(L, p) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
92 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
93 case DC_SIGCHAR_STRING:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
94 dcArgPointer(g_pCallVM, (DCpointer) lua_tostring(L, p) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
95 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
96 }
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
97 ++p;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
98 }
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
99
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
100 switch(*s)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
101 {
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
102 case DC_SIGCHAR_VOID:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
103 dcCallVoid(g_pCallVM, f);
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
104 return 0;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
105 case DC_SIGCHAR_BOOL:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
106 lua_pushboolean( L, (int) dcCallBool(g_pCallVM, f) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
107 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
108 case DC_SIGCHAR_CHAR:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
109 lua_pushnumber( L, (lua_Number) ( dcCallChar(g_pCallVM,f) ) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
110 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
111 case DC_SIGCHAR_SHORT:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
112 lua_pushnumber( L, (lua_Number)( dcCallShort(g_pCallVM, f) ) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
113 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
114 case DC_SIGCHAR_INT:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
115 lua_pushnumber( L, (lua_Number)( dcCallInt(g_pCallVM, f) ) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
116 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
117 case DC_SIGCHAR_LONG:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
118 lua_pushnumber( L, (lua_Number)( dcCallLong(g_pCallVM, f) ) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
119 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
120 case DC_SIGCHAR_LONGLONG:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
121 lua_pushnumber( L, (lua_Number)( dcCallLongLong(g_pCallVM, f) ) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
122 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
123 case DC_SIGCHAR_FLOAT:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
124 lua_pushnumber( L, (lua_Number) dcCallFloat(g_pCallVM, f) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
125 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
126 case DC_SIGCHAR_DOUBLE:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
127 lua_pushnumber( L, (lua_Number) dcCallDouble(g_pCallVM, f) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
128 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
129 case DC_SIGCHAR_STRING:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
130 lua_pushstring( L, (const char*) dcCallPointer(g_pCallVM, f) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
131 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
132 case DC_SIGCHAR_POINTER:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
133 lua_pushlightuserdata( L, dcCallPointer(g_pCallVM, f) );
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
134 break;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
135 }
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
136 return 1;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
137 }
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
138
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
139 static const luaL_Reg dclib[] =
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
140 {
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
141 {"load", luaDC_load},
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
142 {"find", luaDC_find},
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
143 {"mode", luaDC_mode},
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
144 {"call", luaDC_call},
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
145 {NULL,NULL}
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
146 };
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
147
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
148 typedef struct
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
149 {
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
150 const char* name;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
151 int value;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
152 } ModeEnum;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
153
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
154 ModeEnum gModeEnums[] =
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
155 {
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
156 "C_DEFAULT", DC_CALL_C_DEFAULT,
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
157 "C_X86_CDECL", DC_CALL_C_X86_CDECL,
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
158 "C_X86_WIN32_STD", DC_CALL_C_X86_WIN32_STD,
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
159 "C_X86_FAST_MS", DC_CALL_C_X86_WIN32_FAST_MS,
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
160 "C_X86_WIN32_THIS_MS", DC_CALL_C_X86_WIN32_THIS_MS,
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
161 "C_X86_WIN32_THIS_GNU", DC_CALL_C_X86_WIN32_THIS_GNU,
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
162 "C_X86_WIN32_FAST_GNU", DC_CALL_C_X86_WIN32_FAST_GNU,
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
163 "C_X64_WIN64", DC_CALL_C_X64_WIN64,
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
164 "C_PPC32_DARWIN", DC_CALL_C_PPC32_DARWIN,
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
165 "C_ARM", DC_CALL_C_ARM,
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
166 "C_MIPS_EABI", DC_CALL_C_MIPS32_EABI,
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
167 "C_MIPS_PSPSDK", DC_CALL_C_MIPS32_PSPSDK
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
168 };
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
169
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
170 LUA_API int luadc_open (lua_State* L)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
171 {
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
172 int i = 0, n = sizeof(gModeEnums)/sizeof(ModeEnum);
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
173 g_pCallVM = dcNewCallVM(256);
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
174 luaL_register(L, LUA_DCLIBNAME, dclib);
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
175
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
176 for (i = 0; i < n ; ++i )
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
177 {
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
178 lua_pushnumber(L, gModeEnums[i].value);
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
179 lua_setfield(L, -2, gModeEnums[i].name);
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
180
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
181 }
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
182 return 1;
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
183 }
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
184