MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / str_char

Function str_char

deps/lua/src/lstrlib.c:125–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123
124
125static 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
140static int writer (lua_State *L, const void* b, size_t size, void* B) {

Callers

nothing calls this directly

Calls 3

lua_gettopFunction · 0.85
luaL_buffinitFunction · 0.85
luaL_pushresultFunction · 0.85

Tested by

no test coverage detected