MCPcopy Create free account
hub / github.com/defold/defold / CheckStreamNoError

Function CheckStreamNoError

engine/gamesys/src/gamesys/scripts/script_buffer.cpp:249–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247 }
248
249 static BufferStream* CheckStreamNoError(lua_State* L, int index)
250 {
251 if (lua_type(L, index) == LUA_TUSERDATA)
252 {
253 BufferStream* stream = (BufferStream*)dmScript::ToUserType(L, index, dmScript::SCRIPT_BUFFERSTREAM_TYPE_HASH);
254 if (stream && dmBuffer::IsBufferValid(stream->m_Buffer))
255 {
256 return stream;
257 }
258 }
259 return 0x0;
260 }
261
262 static BufferStream* CheckStream(lua_State* L, int index)
263 {

Callers 1

Stream_gcFunction · 0.85

Calls 3

lua_typeFunction · 0.85
ToUserTypeFunction · 0.85
IsBufferValidFunction · 0.85

Tested by

no test coverage detected