From d080fb3ed6d79bdd4c470e09316c282a2fe2f8a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Mon, 7 Aug 2000 20:53:20 +0200 Subject: [PATCH] Bugfix for ecl. Rev: src/interpret.h:1.60 --- src/interpret.h | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/src/interpret.h b/src/interpret.h index 23b64f597a..e75b8e052b 100644 --- a/src/interpret.h +++ b/src/interpret.h @@ -5,7 +5,7 @@ \*/ /* - * $Id: interpret.h,v 1.59 2000/08/07 16:02:47 grubba Exp $ + * $Id: interpret.h,v 1.60 2000/08/07 18:53:20 grubba Exp $ */ #ifndef INTERPRET_H #define INTERPRET_H @@ -174,24 +174,6 @@ enum apply_type APPLY_LOW /* arg1 is the object pointer,(int)arg2 the function */ }; -#ifdef __ECL -static inline void apply_low(struct object *o, ptrdiff_t fun, INT32 args) -{ - mega_apply(APPLY_LOW, args, (void*)o, (void*)fun); -} - -static inline void strict_apply_svalue(struct svalue *sval, INT32 args) -{ - mega_apply(APPLY_SVALUE, args, (void*)sval, 0); -} -#else /* !__ECL */ -#define apply_low(O,FUN,ARGS) \ - mega_apply(APPLY_LOW, (ARGS), (void*)(O),(void*)(FUN)) - -#define strict_apply_svalue(SVAL,ARGS) \ - mega_apply(APPLY_SVALUE, (ARGS), (void*)(SVAL),0) -#endif /* __ECL */ - #define APPLY_MASTER(FUN,ARGS) \ do{ \ static int fun_,master_cnt=0; \ @@ -258,6 +240,27 @@ void cleanup_interpret(void); void really_clean_up_interpret(void); /* Prototypes end here */ +/* These need to be after the prototypes, + * to avoid implicit declaration of mega_apply(). + */ +#ifdef __ECL +static inline void apply_low(struct object *o, ptrdiff_t fun, INT32 args) +{ + mega_apply(APPLY_LOW, args, (void*)o, (void*)fun); +} + +static inline void strict_apply_svalue(struct svalue *sval, INT32 args) +{ + mega_apply(APPLY_SVALUE, args, (void*)sval, 0); +} +#else /* !__ECL */ +#define apply_low(O,FUN,ARGS) \ + mega_apply(APPLY_LOW, (ARGS), (void*)(O),(void*)(FUN)) + +#define strict_apply_svalue(SVAL,ARGS) \ + mega_apply(APPLY_SVALUE, (ARGS), (void*)(SVAL),0) +#endif /* __ECL */ + PMOD_EXPORT extern int d_flag; /* really in main.c */ PMOD_EXPORT extern int Pike_stack_size; -- GitLab