/* Abstract Machine for the Small compiler
*
* Copyright (c) ITB CompuPhase, 1997-2003
- * Portions Copyright (c) Carsten Haitzler, 2004 <raster@rasterman.com>
+ * Portions Copyright (c) Carsten Haitzler, 2004-2010 <raster@rasterman.com>
*
* This software is provided "as-is", without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from
* 3. This notice may not be removed or altered from any source distribution.
*/
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
#ifdef HAVE_CONFIG_H
# include "config.h"
Embryo_Header *hdr;
int i, num;
- if ((ep == NULL ) || (name == NULL) || (func == NULL)) return;
+ if ((!ep ) || (!name) || (!func)) return;
if (strlen(name) > sNAMEMAX) return;
hdr = (Embryo_Header *)ep->code;
{
Embryo_Native *calls;
- ep->native_calls_alloc += 16;
+ ep->native_calls_alloc += 32;
calls = realloc(ep->native_calls,
ep->native_calls_alloc * sizeof(Embryo_Native));
if (!calls)
{
ep->native_calls_size--;
- ep->native_calls_alloc -= 16;
+ ep->native_calls_alloc -= 32;
return;
}
ep->native_calls = calls;
Embryo_Param *pr;
Embryo_Cell *cell_array;
- cell_array = malloc(num * sizeof(Embryo_Cell));
if ((!cells) || (num <= 0))
return embryo_parameter_cell_push(ep, 0);
+ cell_array = malloc(num * sizeof(Embryo_Cell));
ep->params_size++;
if (ep->params_size > ep->params_alloc)
{