place INLINE_ONLY at front of extern inline declarations AND definitions. gcc and clang then behave the same.

This commit is contained in:
Denys Duchier
2012-06-30 20:42:14 +02:00
parent a34b45bcc0
commit 97163fa150
20 changed files with 764 additions and 767 deletions

View File

@@ -119,19 +119,19 @@ bp_get_arity(TERM t)
// TERM bp_insert_pred(char *name, int arity, int (*func)())
#define bp_insert_pred(name, arity, func) YAP_UserCPredicate(name, func, arity)
extern inline int bp_call_string(const char *goal) INLINE_ONLY;
extern inline int bp_call_term(TERM t) INLINE_ONLY;
extern inline int bp_next_solution(void) INLINE_ONLY;
extern inline int bp_mount_query_term(TERM goal) INLINE_ONLY;
INLINE_ONLY extern inline int bp_call_string(const char *goal);
INLINE_ONLY extern inline int bp_call_term(TERM t);
INLINE_ONLY extern inline int bp_next_solution(void);
INLINE_ONLY extern inline int bp_mount_query_term(TERM goal);
// int bp_call_string(char *goal)
extern inline int
INLINE_ONLY extern inline int
bp_call_string(const char *goal) {
return YAP_RunGoal(YAP_ReadBuffer(goal, NULL));
}
// int bp_call_term(TERM goal)
extern inline int
INLINE_ONLY extern inline int
bp_call_term(TERM t) {
return YAP_RunGoal(t);
}
@@ -151,7 +151,7 @@ extern YAP_Term YAP_BPROLOG_curr_toam_status;
extern YAP_Int YAP_BPROLOG_exception;
// TERM bp_next_solution()
extern inline int bp_next_solution(void)
INLINE_ONLY extern inline int bp_next_solution(void)
{
if (curr_toam_status) {
TERM goal = curr_toam_status;
@@ -165,7 +165,7 @@ extern inline int bp_next_solution(void)
#define bp_mount_query_string(goal) (curr_toam_status = YAP_ReadBuffer(goal, NULL))
// void bp_mount_query_term(TERM goal)
extern inline int
INLINE_ONLY extern inline int
bp_mount_query_term(TERM goal)
{
curr_toam_status = goal;