MCPcopy Index your code
hub / github.com/Moddable-OpenSource/moddable / grow_stack

Function grow_stack

contributed/jsonparser/jsonparser.c:44–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44int *grow_stack( int *stack, int *psd )
45{
46 int old = *psd;
47 *psd = *psd * 2;
48
49 int *ns = c_malloc( *psd * sizeof(int) );
50 if ( ns != C_NULL )
51 c_memcpy( ns, stack, old * sizeof(int) );
52 c_free( stack );
53 return ns;
54}
55
56static const char execute_on_closed[] ICACHE_XS6STRING_ATTR = "execute on closed jsonparser";
57static const char not_enough_memory[] ICACHE_XS6STRING_ATTR = "jsonparser out of memory";

Callers 1

xs_jsonparser_receiveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected