MCPcopy Create free account
hub / github.com/F-Stack/f-stack / str_char

Function str_char

freebsd/contrib/openzfs/module/lua/lstrlib.c:162–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160
161
162static 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)

Callers

nothing calls this directly

Calls 3

luaL_buffinitsizeFunction · 0.85
luaL_pushresultsizeFunction · 0.85
lua_gettopFunction · 0.70

Tested by

no test coverage detected