| 339 | /* --------------------------- Lua types encoding --------------------------- */ |
| 340 | |
| 341 | void mp_encode_lua_string(lua_State *L, mp_buf *buf) { |
| 342 | size_t len; |
| 343 | const char *s; |
| 344 | |
| 345 | s = lua_tolstring(L,-1,&len); |
| 346 | mp_encode_bytes(L,buf,(const unsigned char*)s,len); |
| 347 | } |
| 348 | |
| 349 | void mp_encode_lua_bool(lua_State *L, mp_buf *buf) { |
| 350 | unsigned char b = lua_toboolean(L,-1) ? 0xc3 : 0xc2; |
no test coverage detected