MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / str_char

Function str_char

third-party/lua-5.2.4/src/lstrlib.c:152–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150
151
152static int str_char (lua_State *L) {
153 int n = lua_gettop(L); /* number of arguments */
154 int i;
155 luaL_Buffer b;
156 char *p = luaL_buffinitsize(L, &b, n);
157 for (i=1; i<=n; i++) {
158 int c = luaL_checkint(L, i);
159 luaL_argcheck(L, uchar(c) == c, i, "value out of range");
160 p[i - 1] = uchar(c);
161 }
162 luaL_pushresultsize(&b, n);
163 return 1;
164}
165
166
167static int writer (lua_State *L, const void* b, size_t size, void* B) {

Callers

nothing calls this directly

Calls 3

lua_gettopFunction · 0.70
luaL_buffinitsizeFunction · 0.70
luaL_pushresultsizeFunction · 0.70

Tested by

no test coverage detected