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

Function pushnexttemplate

app/redis-6.2.6/deps/lua/src/loadlib.c:340–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338
339
340static const char *pushnexttemplate (lua_State *L, const char *path) {
341 const char *l;
342 while (*path == *LUA_PATHSEP) path++; /* skip separators */
343 if (*path == '\0') return NULL; /* no more templates */
344 l = strchr(path, *LUA_PATHSEP); /* find next separator */
345 if (l == NULL) l = path + strlen(path);
346 lua_pushlstring(L, path, l - path); /* template */
347 return l;
348}
349
350
351static const char *findfile (lua_State *L, const char *name,

Callers 1

findfileFunction · 0.85

Calls 2

strchrFunction · 0.85
lua_pushlstringFunction · 0.70

Tested by

no test coverage detected