MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / on_realloc_function

Function on_realloc_function

src/script/duktape/engine.cpp:37–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 }
36
37 void* on_realloc_function(void* udata, void* ptr, duk_size_t size) {
38 if (!ptr) {
39 if (size)
40 return base_malloc(size);
41 else
42 return nullptr;
43 }
44 else if (!size) {
45 base_free(ptr);
46 return nullptr;
47 }
48 else
49 return base_realloc(ptr, size);
50 }
51
52 void on_free_function(void* udata, void* ptr) {
53 if (ptr)

Callers

nothing calls this directly

Calls 3

base_mallocFunction · 0.85
base_freeFunction · 0.85
base_reallocFunction · 0.85

Tested by

no test coverage detected