| 160 | |
| 161 | |
| 162 | static int str_char (lua_State *L) { |
| 163 | int n = lua_gettop(L); /* number of arguments */ |
| 164 | int i; |
| 165 | luaL_Buffer b; |
| 166 | char *p = luaL_buffinitsize(L, &b, n); |
| 167 | for (i=1; i<=n; i++) { |
| 168 | int c = luaL_checkint(L, i); |
| 169 | luaL_argcheck(L, uchar(c) == c, i, "value out of range"); |
| 170 | p[i - 1] = uchar(c); |
| 171 | } |
| 172 | luaL_pushresultsize(&b, n); |
| 173 | return 1; |
| 174 | } |
| 175 | |
| 176 | |
| 177 | #if defined(LUA_USE_DUMP) |
nothing calls this directly
no test coverage detected