@@ -43,7 +43,7 @@ unsafe fn compat53_findfield(L: *mut lua_State, objidx: c_int, level: c_int) ->
43
43
} else if compat53_findfield ( L , objidx, level - 1 ) != 0 {
44
44
// try recursively
45
45
lua_remove ( L , -2 ) ; // remove table (but keep name)
46
- lua_pushliteral ( L , "." ) ;
46
+ lua_pushliteral ( L , c ".") ;
47
47
lua_insert ( L , -2 ) ; // place '.' between the two names
48
48
lua_concat ( L , 3 ) ;
49
49
return 1 ;
@@ -77,7 +77,7 @@ unsafe fn compat53_pushfuncname(L: *mut lua_State, level: c_int, ar: *mut lua_De
77
77
lua_pushfstring ( L , cstr ! ( "function '%s'" ) , lua_tostring ( L , -1 ) ) ;
78
78
lua_remove ( L , -2 ) ; // remove name
79
79
} else {
80
- lua_pushliteral ( L , "?" ) ;
80
+ lua_pushliteral ( L , c "?") ;
81
81
}
82
82
}
83
83
@@ -198,7 +198,7 @@ pub unsafe fn lua_rawgetp(L: *mut lua_State, idx: c_int, p: *const c_void) -> c_
198
198
pub unsafe fn lua_getuservalue ( L : * mut lua_State , mut idx : c_int ) -> c_int {
199
199
luaL_checkstack ( L , 2 , cstr ! ( "not enough stack slots available" ) ) ;
200
200
idx = lua_absindex ( L , idx) ;
201
- lua_pushliteral ( L , "__mlua_uservalues" ) ;
201
+ lua_pushliteral ( L , c "__mlua_uservalues") ;
202
202
if lua_rawget ( L , LUA_REGISTRYINDEX ) != LUA_TTABLE {
203
203
return LUA_TNIL ;
204
204
}
@@ -236,13 +236,13 @@ pub unsafe fn lua_rawsetp(L: *mut lua_State, idx: c_int, p: *const c_void) {
236
236
pub unsafe fn lua_setuservalue ( L : * mut lua_State , mut idx : c_int ) {
237
237
luaL_checkstack ( L , 4 , cstr ! ( "not enough stack slots available" ) ) ;
238
238
idx = lua_absindex ( L , idx) ;
239
- lua_pushliteral ( L , "__mlua_uservalues" ) ;
239
+ lua_pushliteral ( L , c "__mlua_uservalues") ;
240
240
lua_pushvalue ( L , -1 ) ;
241
241
if lua_rawget ( L , LUA_REGISTRYINDEX ) != LUA_TTABLE {
242
242
lua_pop ( L , 1 ) ;
243
243
lua_createtable ( L , 0 , 2 ) ; // main table
244
244
lua_createtable ( L , 0 , 1 ) ; // metatable
245
- lua_pushliteral ( L , "k" ) ;
245
+ lua_pushliteral ( L , c "k") ;
246
246
lua_setfield ( L , -2 , cstr ! ( "__mode" ) ) ;
247
247
lua_setmetatable ( L , -2 ) ;
248
248
lua_pushvalue ( L , -2 ) ;
@@ -316,7 +316,7 @@ pub unsafe fn luaL_checkstack(L: *mut lua_State, sz: c_int, msg: *const c_char)
316
316
if !msg. is_null ( ) {
317
317
luaL_error ( L , cstr ! ( "stack overflow (%s)" ) , msg) ;
318
318
} else {
319
- lua_pushliteral ( L , "stack overflow" ) ;
319
+ lua_pushliteral ( L , c "stack overflow") ;
320
320
lua_error ( L ) ;
321
321
}
322
322
}
@@ -455,19 +455,19 @@ pub unsafe fn luaL_traceback(L: *mut lua_State, L1: *mut lua_State, msg: *const
455
455
if !msg. is_null ( ) {
456
456
lua_pushfstring ( L , cstr ! ( "%s\n " ) , msg) ;
457
457
}
458
- lua_pushliteral ( L , "stack traceback:" ) ;
458
+ lua_pushliteral ( L , c "stack traceback:") ;
459
459
while lua_getinfo ( L1 , level, cstr ! ( "" ) , & mut ar) != 0 {
460
460
if level + 1 == mark {
461
461
// too many levels?
462
- lua_pushliteral ( L , "\n \t ..." ) ; // add a '...'
462
+ lua_pushliteral ( L , c "\n \t ...") ; // add a '...'
463
463
level = numlevels - COMPAT53_LEVELS2 ; // and skip to last ones
464
464
} else {
465
465
lua_getinfo ( L1 , level, cstr ! ( "sln" ) , & mut ar) ;
466
466
lua_pushfstring ( L , cstr ! ( "\n \t %s:" ) , ar. short_src ) ;
467
467
if ar. currentline > 0 {
468
468
lua_pushfstring ( L , cstr ! ( "%d:" ) , ar. currentline ) ;
469
469
}
470
- lua_pushliteral ( L , " in " ) ;
470
+ lua_pushliteral ( L , c " in ") ;
471
471
compat53_pushfuncname ( L , level, & mut ar) ;
472
472
lua_concat ( L , lua_gettop ( L ) - top) ;
473
473
}
@@ -481,16 +481,16 @@ pub unsafe fn luaL_tolstring(L: *mut lua_State, mut idx: c_int, len: *mut usize)
481
481
if luaL_callmeta ( L , idx, cstr ! ( "__tostring" ) ) == 0 {
482
482
match lua_type ( L , idx) {
483
483
LUA_TNIL => {
484
- lua_pushliteral ( L , "nil" ) ;
484
+ lua_pushliteral ( L , c "nil") ;
485
485
}
486
486
LUA_TSTRING | LUA_TNUMBER => {
487
487
lua_pushvalue ( L , idx) ;
488
488
}
489
489
LUA_TBOOLEAN => {
490
490
if lua_toboolean ( L , idx) == 0 {
491
- lua_pushliteral ( L , "false" ) ;
491
+ lua_pushliteral ( L , c "false") ;
492
492
} else {
493
- lua_pushliteral ( L , "true" ) ;
493
+ lua_pushliteral ( L , c "true") ;
494
494
}
495
495
}
496
496
t => {
0 commit comments