MCPcopy Create free account
hub / github.com/PlutoLang/Pluto / checkbuffer

Function checkbuffer

src/lbufferlib.cpp:70–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68};
69
70[[nodiscard]] static PlutoBuffer* checkbuffer (lua_State *L, int i) {
71 const auto buf = (PlutoBuffer*)luaL_checkudata(L, i, "pluto:buffer");
72#ifdef PLUTO_MEMORY_LIMIT
73 buf->allocator.L = L;
74#endif
75 return buf;
76}
77
78static int buffer_new (lua_State *L) {
79 new (lua_newuserdata(L, sizeof(PlutoBuffer))) PlutoBuffer{};

Callers 3

buffer_newFunction · 0.70
buffer_appendFunction · 0.70
buffer_tostringFunction · 0.70

Calls 1

luaL_checkudataFunction · 0.85

Tested by

no test coverage detected