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

Function PushStringHelper

engine/script/src/script_hash.cpp:363–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

361 }
362
363 static void PushStringHelper(lua_State* L, int index)
364 {
365 dmhash_t* phash = ToHash(L, index);
366 if (phash != 0)
367 {
368 char buffer[256];
369 DM_HASH_REVERSE_MEM(hash_ctx, 256);
370 dmSnPrintf(buffer, sizeof(buffer), "[%s]", dmHashReverseSafe64Alloc(&hash_ctx, *phash));
371 lua_pushstring(L, buffer);
372 }
373 else
374 {
375 lua_pushstring(L, luaL_checkstring(L, index));
376 }
377 }
378
379 static int Hash_concat(lua_State *L)
380 {

Callers 1

Hash_concatFunction · 0.85

Calls 4

ToHashFunction · 0.85
dmSnPrintfFunction · 0.85
dmHashReverseSafe64AllocFunction · 0.85
lua_pushstringFunction · 0.85

Tested by

no test coverage detected