| 123 | |
| 124 | |
| 125 | static int str_char (lua_State *L) { |
| 126 | int n = lua_gettop(L); /* number of arguments */ |
| 127 | int i; |
| 128 | luaL_Buffer b; |
| 129 | luaL_buffinit(L, &b); |
| 130 | for (i=1; i<=n; i++) { |
| 131 | int c = luaL_checkint(L, i); |
| 132 | luaL_argcheck(L, uchar(c) == c, i, "invalid value"); |
| 133 | luaL_addchar(&b, uchar(c)); |
| 134 | } |
| 135 | luaL_pushresult(&b); |
| 136 | return 1; |
| 137 | } |
| 138 | |
| 139 | |
| 140 | static int writer (lua_State *L, const void* b, size_t size, void* B) { |
nothing calls this directly
no test coverage detected