added some code to calculate log2(x)

This commit is contained in:
hyunghwan.chung
2015-11-03 14:58:19 +00:00
parent e061b94832
commit a033e2669b
2 changed files with 21 additions and 7 deletions

View File

@ -26,8 +26,10 @@
#include "stix-prv.h"
#if defined(USE_DYNCALL)
/* TODO: defined dcAllocMem and dcFreeMeme before builing the dynload and dyncall library */
#include <dyncall.h> /* TODO: remove this. make dyXXXX calls to callbacks */
# include <dyncall.h> /* TODO: remove this. make dyXXXX calls to callbacks */
#endif
/* TODO: context's stack overflow check in various part of this file */
/* TOOD: determine the right stack size */
@ -1363,6 +1365,7 @@ static int prim_ffi_close (stix_t* stix, stix_ooi_t nargs)
static int prim_ffi_call (stix_t* stix, stix_ooi_t nargs)
{
#if defined(USE_DYNCALL)
stix_oop_t rcv, fun, sig, args;
STIX_ASSERT (nargs == 3);
@ -1526,8 +1529,10 @@ printf ("CALL ERROR %d %d\n", dcGetError (dc), DC_ERROR_UNSUPPORTED_MODE);
dcFree (dc);
}
return 1;
#else
return 0;
#endif
}
static int prim_ffi_getsym (stix_t* stix, stix_ooi_t nargs)
@ -1572,7 +1577,6 @@ printf ("wrong function name...\n");
}
struct prim_t
{
stix_ooi_t nargs; /* expected number of arguments */