From d7665e2b30ec883815676967a98635b14c588241 Mon Sep 17 00:00:00 2001 From: vsc Date: Tue, 11 Jun 2002 05:50:29 +0000 Subject: [PATCH] try to improve manual. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@527 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- docs/yap.tex | 6 ++++-- include/c_interface.h | 8 +++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/yap.tex b/docs/yap.tex index ec80ef74f..e1b0df5ca 100644 --- a/docs/yap.tex +++ b/docs/yap.tex @@ -12736,7 +12736,8 @@ static int start_n100() The routine starts by getting the dereference value of the argument. The call to @code{PRESERVE_DATA} is used to initialize the memory which will -hold the information to be preserved across backtracking. +hold the information to be preserved across backtracking. The first +argument is the variable we shall use, and the second its type. If the argument of the predicate is a variable, the routine initializes the structure to be preserved across backtracking with the information @@ -12799,7 +12800,8 @@ call to @noindent where @code{name} is a string with the name of the predicate, @code{init} and @code{cont} are the C functions used to start and continue the execution of -the predicate, and @code{arity} is the predicate arity. +the predicate, @code{arity} is the predicate arity, and @code{sizeof} is +the size of the data to be preserved in the stack. @node Loading Objects, Sav&Rest, Writing C, C-Interface @section Loading Object Files diff --git a/include/c_interface.h b/include/c_interface.h index 1919459be..16cf86266 100644 --- a/include/c_interface.h +++ b/include/c_interface.h @@ -331,13 +331,11 @@ static Int (*YapIArityOfFunctor)() = YapArityOfFunctor; extern X_API void *PROTO(YapExtraSpace,(void)); #ifdef IndirectCalls static void *(*YapIExtraSpace)() = YapExtraSpace; -#define ExtraSpace() (*YapExtraSpace)() -#else -#define ExtraSpace() YapExtraSpace() +#define YapExtraSpace() (*YapExtraSpace)() #endif -#define PRESERVE_DATA(ptr, type) (ptr = (type *)ExtraSpace()) -#define PRESERVED_DATA(ptr, type) (ptr = (type *)ExtraSpace()) +#define PRESERVE_DATA(ptr, type) (ptr = (type *)YapExtraSpace()) +#define PRESERVED_DATA(ptr, type) (ptr = (type *)YapExtraSpace()) /* Int unify(Term a, Term b) */ extern X_API Int PROTO(YapUnify,(Term, Term));