@@ -41,7 +41,7 @@ unsafe fn compat53_findfield(L: *mut lua_State, objidx: c_int, level: c_int) ->
41
41
} else if compat53_findfield ( L , objidx, level - 1 ) != 0 {
42
42
// try recursively
43
43
lua_remove ( L , -2 ) ; // remove table (but keep name)
44
- lua_pushliteral ( L , "." ) ;
44
+ lua_pushliteral ( L , c ".") ;
45
45
lua_insert ( L , -2 ) ; // place '.' between the two names
46
46
lua_concat ( L , 3 ) ;
47
47
return 1 ;
@@ -75,7 +75,7 @@ unsafe fn compat53_pushfuncname(L: *mut lua_State, level: c_int, ar: *mut lua_De
75
75
lua_pushfstring ( L , cstr ! ( "function '%s'" ) , lua_tostring ( L , -1 ) ) ;
76
76
lua_remove ( L , -2 ) ; // remove name
77
77
} else {
78
- lua_pushliteral ( L , "?" ) ;
78
+ lua_pushliteral ( L , c "?") ;
79
79
}
80
80
}
81
81
@@ -196,7 +196,7 @@ pub unsafe fn lua_rawgetp(L: *mut lua_State, idx: c_int, p: *const c_void) -> c_
196
196
pub unsafe fn lua_getuservalue ( L : * mut lua_State , mut idx : c_int ) -> c_int {
197
197
luaL_checkstack ( L , 2 , cstr ! ( "not enough stack slots available" ) ) ;
198
198
idx = lua_absindex ( L , idx) ;
199
- lua_pushliteral ( L , "__mlua_uservalues" ) ;
199
+ lua_pushliteral ( L , c "__mlua_uservalues") ;
200
200
if lua_rawget ( L , LUA_REGISTRYINDEX ) != LUA_TTABLE {
201
201
return LUA_TNIL ;
202
202
}
@@ -234,13 +234,13 @@ pub unsafe fn lua_rawsetp(L: *mut lua_State, idx: c_int, p: *const c_void) {
234
234
pub unsafe fn lua_setuservalue ( L : * mut lua_State , mut idx : c_int ) {
235
235
luaL_checkstack ( L , 4 , cstr ! ( "not enough stack slots available" ) ) ;
236
236
idx = lua_absindex ( L , idx) ;
237
- lua_pushliteral ( L , "__mlua_uservalues" ) ;
237
+ lua_pushliteral ( L , c "__mlua_uservalues") ;
238
238
lua_pushvalue ( L , -1 ) ;
239
239
if lua_rawget ( L , LUA_REGISTRYINDEX ) != LUA_TTABLE {
240
240
lua_pop ( L , 1 ) ;
241
241
lua_createtable ( L , 0 , 2 ) ; // main table
242
242
lua_createtable ( L , 0 , 1 ) ; // metatable
243
- lua_pushliteral ( L , "k" ) ;
243
+ lua_pushliteral ( L , c "k") ;
244
244
lua_setfield ( L , -2 , cstr ! ( "__mode" ) ) ;
245
245
lua_setmetatable ( L , -2 ) ;
246
246
lua_pushvalue ( L , -2 ) ;
@@ -301,7 +301,7 @@ pub unsafe fn luaL_checkstack(L: *mut lua_State, sz: c_int, msg: *const c_char)
301
301
if !msg. is_null ( ) {
302
302
luaL_error ( L , cstr ! ( "stack overflow (%s)" ) , msg) ;
303
303
} else {
304
- lua_pushliteral ( L , "stack overflow" ) ;
304
+ lua_pushliteral ( L , c "stack overflow") ;
305
305
lua_error ( L ) ;
306
306
}
307
307
}
@@ -440,19 +440,19 @@ pub unsafe fn luaL_traceback(L: *mut lua_State, L1: *mut lua_State, msg: *const
440
440
if !msg. is_null ( ) {
441
441
lua_pushfstring ( L , cstr ! ( "%s\n " ) , msg) ;
442
442
}
443
- lua_pushliteral ( L , "stack traceback:" ) ;
443
+ lua_pushliteral ( L , c "stack traceback:") ;
444
444
while lua_getinfo ( L1 , level, cstr ! ( "" ) , & mut ar) != 0 {
445
445
if level + 1 == mark {
446
446
// too many levels?
447
- lua_pushliteral ( L , "\n \t ..." ) ; // add a '...'
447
+ lua_pushliteral ( L , c "\n \t ...") ; // add a '...'
448
448
level = numlevels - COMPAT53_LEVELS2 ; // and skip to last ones
449
449
} else {
450
450
lua_getinfo ( L1 , level, cstr ! ( "sln" ) , & mut ar) ;
451
451
lua_pushfstring ( L , cstr ! ( "\n \t %s:" ) , ar. short_src ) ;
452
452
if ar. currentline > 0 {
453
453
lua_pushfstring ( L , cstr ! ( "%d:" ) , ar. currentline ) ;
454
454
}
455
- lua_pushliteral ( L , " in " ) ;
455
+ lua_pushliteral ( L , c " in ") ;
456
456
compat53_pushfuncname ( L , level, & mut ar) ;
457
457
lua_concat ( L , lua_gettop ( L ) - top) ;
458
458
}
@@ -466,16 +466,16 @@ pub unsafe fn luaL_tolstring(L: *mut lua_State, mut idx: c_int, len: *mut usize)
466
466
if luaL_callmeta ( L , idx, cstr ! ( "__tostring" ) ) == 0 {
467
467
match lua_type ( L , idx) {
468
468
LUA_TNIL => {
469
- lua_pushliteral ( L , "nil" ) ;
469
+ lua_pushliteral ( L , c "nil") ;
470
470
}
471
471
LUA_TSTRING | LUA_TNUMBER => {
472
472
lua_pushvalue ( L , idx) ;
473
473
}
474
474
LUA_TBOOLEAN => {
475
475
if lua_toboolean ( L , idx) == 0 {
476
- lua_pushliteral ( L , "false" ) ;
476
+ lua_pushliteral ( L , c "false") ;
477
477
} else {
478
- lua_pushliteral ( L , "true" ) ;
478
+ lua_pushliteral ( L , c "true") ;
479
479
}
480
480
}
481
481
t => {
0 commit comments