Symbol FREE-FFI-CLOSURE should only be defined when using LIBFFI

This commit is contained in:
Juan Jose Garcia Ripoll 2011-08-27 19:30:59 +02:00
parent 69cc872fe5
commit ab151e9c55
2 changed files with 12 additions and 2 deletions

View file

@ -76,6 +76,11 @@ typedef struct {
#else
# define IF_DFFI(x) NULL
#endif
#if defined(HAVE_LIBFFI)
# define IF_LIBFFI(x) x
#else
# define IF_LIBFFI(x) NULL
#endif
cl_symbol_initializer
cl_symbols[] = {
@ -1718,7 +1723,7 @@ cl_symbols[] = {
{SYS_ "CALL-CFUN", SI_ORDINARY, IF_DFFI(si_call_cfun), -1, OBJNULL},
{KEY_ "CALLBACK", KEYWORD, NULL, -1, OBJNULL},
{SYS_ "MAKE-DYNAMIC-CALLBACK", SI_ORDINARY, IF_DFFI(si_make_dynamic_callback), -1, OBJNULL},
{SYS_ "FREE-FFI-CLOSURE", SI_ORDINARY, IF_DFFI(si_free_ffi_closure), 1, OBJNULL},
{SYS_ "FREE-FFI-CLOSURE", SI_ORDINARY, IF_LIBFFI(si_free_ffi_closure), 1, OBJNULL},
/* #endif defined(HAVE_LIBFFI) || defined(ECL_DYNAMIC_FFI) */
{KEY_ "CDECL", KEYWORD, NULL, -1, OBJNULL},
{KEY_ "STDCALL", KEYWORD, NULL, -1, OBJNULL},

View file

@ -76,6 +76,11 @@ typedef struct {
#else
# define IF_DFFI(x) NULL
#endif
#if defined(HAVE_LIBFFI)
# define IF_LIBFFI(x) x
#else
# define IF_LIBFFI(x) NULL
#endif
cl_symbol_initializer
cl_symbols[] = {
@ -1718,7 +1723,7 @@ cl_symbols[] = {
{SYS_ "CALL-CFUN",IF_DFFI("si_call_cfun")},
{KEY_ "CALLBACK",NULL},
{SYS_ "MAKE-DYNAMIC-CALLBACK",IF_DFFI("si_make_dynamic_callback")},
{SYS_ "FREE-FFI-CLOSURE",IF_DFFI("si_free_ffi_closure")},
{SYS_ "FREE-FFI-CLOSURE",IF_LIBFFI("si_free_ffi_closure")},
/* #endif defined(HAVE_LIBFFI) || defined(ECL_DYNAMIC_FFI) */
{KEY_ "CDECL",NULL},
{KEY_ "STDCALL",NULL},