@@ -206,7 +206,7 @@ const TValue *getgeneric (Table *t, const TValue *key) {
206
206
}
207
207
208
208
/* Builtin foreign functions */
209
- int titan_print (lua_State * L , int nargs , ...) {
209
+ int titan_print (lua_State * L , CClosure * _mod , int nargs , ...) {
210
210
if (nargs > 0 ) {
211
211
lua_checkstack (L , 3 );
212
212
TValue * top = L -> top ;
@@ -228,14 +228,14 @@ int titan_print(lua_State *L, int nargs, ...) {
228
228
return 0 ;
229
229
}
230
230
231
- TValue titan_assert (lua_State * L , TValue cond , TString * msg ) {
231
+ TValue titan_assert (lua_State * L , CClosure * _mod , TValue cond , TString * msg ) {
232
232
if (l_isfalse (& cond )) {
233
233
luaL_error (L , getstr (msg ));
234
234
}
235
235
return cond ;
236
236
}
237
237
238
- Table * titan_dofile (lua_State * L , TString * fname , int nargs , ...) {
238
+ Table * titan_dofile (lua_State * L , CClosure * _mod , TString * fname , int nargs , ...) {
239
239
TValue * top = L -> top ;
240
240
lua_checkstack (L , 2 + nargs );
241
241
lua_createtable (L , 0 , 0 );
@@ -262,11 +262,11 @@ Table *titan_dofile(lua_State *L, TString *fname, int nargs, ...) {
262
262
return tres ;
263
263
}
264
264
265
- int titan_error (lua_State * L , TString * msg ) {
265
+ int titan_error (lua_State * L , CClosure * _mod , TString * msg ) {
266
266
return luaL_error (L , getstr (msg ));
267
267
}
268
268
269
- Table * titan_dostring (lua_State * L , TString * code , int nargs , ...) {
269
+ Table * titan_dostring (lua_State * L , CClosure * _mod , TString * code , int nargs , ...) {
270
270
TValue * top = L -> top ;
271
271
lua_checkstack (L , 2 + nargs );
272
272
lua_createtable (L , 0 , 0 );
@@ -293,7 +293,7 @@ Table *titan_dostring(lua_State *L, TString *code, int nargs, ...) {
293
293
return tres ;
294
294
}
295
295
296
- TString * titan_tostring (lua_State * L , TValue val ) {
296
+ TString * titan_tostring (lua_State * L , CClosure * _mod , TValue val ) {
297
297
TValue * top = L -> top ;
298
298
lua_checkstack (L , 3 );
299
299
L -> top ++ ;
@@ -305,7 +305,7 @@ TString *titan_tostring(lua_State *L, TValue val) {
305
305
return s ;
306
306
}
307
307
308
- lua_Number titan_tofloat (lua_State * L , TString * s ) {
308
+ lua_Number titan_tofloat (lua_State * L , CClosure * _mod , TString * s ) {
309
309
TValue val ;
310
310
if (luaO_str2num (getstr (s ), & val )) {
311
311
return nvalue (& val );
@@ -314,7 +314,7 @@ lua_Number titan_tofloat(lua_State *L, TString *s) {
314
314
}
315
315
}
316
316
317
- lua_Integer titan_tointeger (lua_State * L , TString * s ) {
317
+ lua_Integer titan_tointeger (lua_State * L , CClosure * _mod , TString * s ) {
318
318
TValue val ;
319
319
if (luaO_str2num (getstr (s ), & val )) {
320
320
lua_Integer res ;
@@ -328,7 +328,7 @@ lua_Integer titan_tointeger(lua_State *L, TString *s) {
328
328
}
329
329
}
330
330
331
- lua_Integer titan_string_byte (lua_State * L , TString * s , lua_Integer index ) {
331
+ lua_Integer titan_string_byte (lua_State * L , CClosure * _mod , TString * s , lua_Integer index ) {
332
332
size_t len = tsslen (s );
333
333
if (index == 0 )
334
334
return 0 ;
0 commit comments