assumes luabb_iscstring is true */
| 583 | |
| 584 | /* assumes luabb_iscstring is true */ |
| 585 | const char *luabb_tocstring(Lua l, int idx) |
| 586 | { |
| 587 | const TValue *o = index2adr(l, idx); |
| 588 | lua_dbtypes_t *bb = luabb_todbpointer(o); |
| 589 | if (bb->dbtype != DBTYPES_CSTRING) abort(); |
| 590 | lua_cstring_t *ptr = (lua_cstring_t *)bb; |
| 591 | return ptr->val; |
| 592 | } |
| 593 | |
| 594 | /* out should be appropriately sized */ |
| 595 | void luabb_fromhex(uint8_t *out, const uint8_t *in, size_t len) |
no test coverage detected