Term Handles or Slots¶
Term handles correspond to SWI-Prolog's term_t datatype: they are a safe representation of terms.
Slots are safe houses in the stack, the garbage collector and the stack shifter know about them and make sure they have correct values. In this case, we use a slot to preserve t during the execution of YAP_RunGoal). When the execution of t is over we read the (possibly changed) value of t back from the slot sl and tell YAP that the slot sl is not needed and can be given back to the system.
YAP supports storing and manipulating term_t like slots or handles, but in the C the programmer needs to take care as most operations still require unwrapping the term inside.
For implementation details and more information, please check term_t_slots in the implementation section.
Define:¶
Functions:¶
1. X_API int YAP_StartSlots(void): : initialize the slot data-structure: all existing slots will be discarded.
Typically, this would be used at the beginning top-level or other outer quqqery.
1. X_API void YAP_EndSlots(int slot): : discard all existing slots: operates as StartSlots, but should be called when we're done.
1. X_API Int YAP_CurrentSlot(void): : report the current position of the slots, assuming that they occupy the top of the stack.
1. X_API yhandle_t YAP_InitSlot(YAP_Term t): : allocate n empty new slots
Return a handle to the system's default slo t. iX_API yhandle_t YAP_NewSlots(int NumberOfSlots);
allocate n empty new slots
Allocate NumberOfSlots from the stack and return an handle to the last one. The other handle can be obtained by decrementing the handle.
1. X_API Term YAP_GetFromSlot(YAP_handle_t slot): : read from a slot.
1. X_API Term * YAP_AddressFromSlot(YAP_handle_t): : get the memory address of a slot
Return the address of slot slot: please use with care.
1. X_API Term * YAP_AddressOfTermInSlot(YAP_handle_t): : get the memory address of the term actually stored in a slot
1. X_API void YAP_PutInSlot(YAP_handle_t slot, YAP_Term t): : store term in a slot
1. X_API int YAP_RecoverSlots(int, YAP_handle_t topSlot): : Succeeds if it recovers the space allocated for $n$ contiguous slots starting at topSlot.
Set the contents of slot slot to t.
1. X_API yhandle_t YAP_ArgsToSlots(int HowMany): : copies the first new n YAAM registers to slots
Store the current first HowMany arguments in new slots.
1. X_API void YAP_SlotsToArgs(int HowMany, YAP_handle_t slot): : copies n slots such that sl is copied to the last abstract ,achine register.
Set the first HowMany arguments to the HowMany slots
1. static arity_t current_arity(void):
1. static int doexpand(UInt sz):
1. X_API YAP_Term YAP_A(int i): : Access to goal arguments.
Notice that is a function
1. X_API YAP_Term YAP_SetA(int i, YAP_Term t): : Copy a term to a goal's arguments. */.
1. X_API YAP_Bool YAP_IsIntTerm(YAP_Term t):
1. X_API YAP_Bool YAP_IsNumberTerm(YAP_Term t):
1. X_API YAP_Bool YAP_IsLongIntTerm(YAP_Term t):
1. X_API YAP_Bool YAP_IsBigNumTerm(YAP_Term t):
1. X_API YAP_Bool YAP_IsRationalTerm(YAP_Term t):
1. X_API YAP_Bool YAP_IsStringTerm(YAP_Term t):
1. X_API YAP_Bool YAP_IsVarTerm(YAP_Term t): : Term t is unbound.
1. X_API YAP_Bool YAP_IsNonVarTerm(YAP_Term t): : Term t is bound.
1. X_API YAP_Bool YAP_IsFloatTerm(Term t):
1. X_API YAP_Bool YAP_IsDbRefTerm(Term t):
1. X_API YAP_Bool YAP_IsAtomTerm(Term t):
1. X_API YAP_Bool YAP_IsPairTerm(Term t):
1. X_API YAP_Bool YAP_IsApplTerm(Term t):
1. X_API YAP_Bool YAP_IsCompoundTerm(Term t):
1. X_API Term YAP_MkIntTerm(Int n):
1. X_API Term YAP_MkStringTerm(const char *n):
1. X_API Term YAP_MkCharPTerm(char *n):
1. X_API Term YAP_MkUnsignedStringTerm(const unsigned char *n):
1. X_API const char * YAP_StringOfTerm(Term t):
1. X_API const unsigned char * YAP_UnsignedStringOfTerm(Term t):
1. X_API Int YAP_IntOfTerm(Term t):
1. X_API Term YAP_MkBigNumTerm(void *big):
1. X_API YAP_Bool YAP_BigNumOfTerm(Term t, void *b):
1. X_API Term YAP_MkRationalTerm(void *big):
1. X_API YAP_Bool YAP_RationalOfTerm(Term t, void *b):
1. X_API Term YAP_MkBlobTerm(unsigned int sz):
1. X_API void * YAP_BlobOfTerm(Term t):
1. X_API Term YAP_MkFloatTerm(double n):
1. X_API YAP_Float YAP_FloatOfTerm(YAP_Term t):
1. X_API Term YAP_MkAtomTerm(YAP_Atom n):
1. X_API YAP_Atom YAP_AtomOfTerm(Term t):
1. X_API bool YAP_IsWideAtom(YAP_Atom a): : returns whether the atom includes non-ascii code-points
1. X_API const char * YAP_AtomName(YAP_Atom a): : returns the text associated to atom a, as UTF-8
1. X_API const wchar_t * YAP_WideAtomName(YAP_Atom a): : returns the wide text associated to atom a
1. X_API YAP_Atom YAP_LookupAtom(const char *c): : returns the interned string c
1. X_API YAP_Atom YAP_LookupWideAtom(const wchar_t *c): : returns the interned wide string c
1. X_API YAP_Atom YAP_FullLookupAtom(const char *c): : returns the interned wide string c, even if hidden.
1. X_API size_t YAP_AtomNameLength(YAP_Atom at): : returns the size of a string, in characters.
1. X_API Term YAP_MkVarTerm(void): : Allocate a new variable in the global stack.
1. X_API Term YAP_MkPairTerm(Term t1, Term t2):
1. X_API Term YAP_MkListFromTerms(Term *ta, Int sz):
1. X_API Term YAP_MkNewPairTerm():
1. X_API Term YAP_HeadOfTerm(Term t):
1. X_API Term YAP_TailOfTerm(Term t):
1. X_API Int YAP_SkipList(Term *l, Term tailp)**:
1. X_API Term YAP_MkApplTerm(YAP_Functor f, UInt arity, Term args[]):
1. X_API Term YAP_MkNewApplTerm(YAP_Functor f, UInt arity):
1. X_API YAP_Functor YAP_FunctorOfTerm(Term t):
1. X_API Term YAP_ArgOfTerm(UInt n, Term t):
1. X_API Term * YAP_ArgsOfTerm(Term t):
1. X_API YAP_Functor YAP_MkFunctor(YAP_Atom a, UInt n):
1. X_API YAP_Atom YAP_NameOfFunctor(YAP_Functor f):
1. X_API UInt YAP_ArityOfFunctor(YAP_Functor f):
1. X_API void * YAP_ExtraSpaceCut(void):
1. X_API void * YAP_ExtraSpace(void):
1. X_API void YAP_cut_up(void):
1. X_API bool YAP_Unify(Term t1, Term t2):
1. X_API int YAP_Unifiable(Term t1, Term t2):
1. X_API int YAP_ExactlyEqual(Term t1, Term t2):
1. X_API int YAP_Variant(Term t1, Term t2):
1. X_API Int YAP_TermHash(Term t, Int sz, Int depth, int variant):
1. X_API Int YAP_NewSlots(int n):
1. X_API Int YAP_InitSlot(Term t):
1. X_API void YAP_PutInSlot(Int slot, Term t):
1. static Int execute_cargs(PredEntry *pe, CPredicate exec_code USES_REGS):
1. static uintptr_t execute_cargs_back(PredEntry pe, CPredicate exec_code, struct foreign_context ctx USES_REGS):
1. static uintptr_t complete_fail(choiceptr ptr, int has_cp USES_REGS):
1. static uintptr_t complete_exit(choiceptr ptr, int has_cp, int cut_all USES_REGS):
1. X_API Int YAP_Execute(PredEntry *pe, CPredicate exec_code):
1. X_API Int YAP_ExecuteFirst(PredEntry *pe, CPredicate exec_code):
1. X_API Int YAP_ExecuteOnCut(PredEntry pe, CPredicate exec_code, struct cut_c_str top):
1. X_API Int YAP_ExecuteNext(PredEntry *pe, CPredicate exec_code):
1. X_API void * YAP_ReallocSpaceFromYap(void *ptr, size_t size): : a version of realloc that allocates space in the DB (most often, just realloc).
1. X_API void * YAP_AllocSpaceFromYap(size_t size): : a version of malloc that allocates space in the DB (most often, just malloc).
1. X_API void YAP_FreeSpaceFromYap(void *ptr): : a version of free that deallocates space in the DB (most often, just free).
1. X_API char * YAP_StringToBuffer(Term t, char *buf, unsigned int bufsize): : copy a string to a buffer, the buffer must have been malloced
tthe text, or string bufthe user-provided buffer bufsizebu return:
1. X_API Term YAP_BufferToString(const char *s):
1. X_API Term YAP_NBufferToString(const char *s, size_t len):
1. X_API Term YAP_WideBufferToString(const wchar_t *s):
1. X_API Term YAP_NWideBufferToString(const wchar_t *s, size_t len):
1. X_API Term YAP_ReadBuffer(const char s, Term tp):
1. X_API YAP_Term YAP_BufferToAtomList(const char *s):
1. X_API Term YAP_NBufferToAtomList(const char *s, size_t len):
1. X_API Term YAP_WideBufferToAtomList(const wchar_t *s):
1. X_API Term YAP_NWideBufferToAtomList(const wchar_t *s, size_t len):
1. X_API Term YAP_NWideBufferToAtomDiffList(const wchar_t *s, Term t0, size_t len):
1. X_API Term YAP_BufferToDiffList(const char *s, Term t0):
1. X_API Term YAP_NBufferToDiffList(const char *s, Term t0, size_t len):
1. X_API Term YAP_WideBufferToDiffList(const wchar_t *s, Term t0):
1. X_API Term YAP_NWideBufferToDiffList(const wchar_t *s, Term t0, size_t len):
1. X_API void YAP_Error__(const char file, const char function, int lineno, int myerrno, Term t, const char *buf,...):
1. X_API YAP_PredEntryPtr YAP_FunctorToPred(YAP_Functor func):
1. X_API YAP_PredEntryPtr YAP_AtomToPred(YAP_Atom at):
1. X_API YAP_PredEntryPtr YAP_FunctorToPredInModule(YAP_Functor func, Term mod):
1. X_API YAP_PredEntryPtr YAP_AtomToPredInModule(YAP_Atom at, Term mod):
1. X_API bool YAP_EnterGoal(YAP_PredEntryPtr ape, CELL ptr, YAP_dogoalinfo dgi):
1. X_API bool YAP_RetryGoal(YAP_dogoalinfo *dgi):
1. X_API bool YAP_LeaveGoal(bool successful, YAP_dogoalinfo *dgi):
1. X_API Int YAP_RunGoal(Term t):
1. X_API Term YAP_AllocExternalDataInStack(size_t cells):
1. X_API YAP_Bool YAP_IsExternalDataInStackTerm(Term t):
1. X_API void * YAP_ExternalDataInStackFromTerm(Term t):
1. X_API YAP_opaque_tag_t YAP_NewOpaqueType(struct YAP_opaque_handler_struct *f):
1. X_API Term YAP_NewOpaqueObject(YAP_opaque_tag_t blob_tag, size_t cells):
1. X_API YAP_Bool YAP_IsBlobTerm(Term t):
1. X_API YAP_Bool YAP_IsOpaqueObjectTerm(Term t, YAP_opaque_tag_t tag):
1. X_API void * YAP_OpaqueObjectFromTerm(Term t):
1. X_API CELL * YAP_HeapStoreOpaqueTerm(Term t):
1. X_API Int YAP_RunGoalOnce(Term t):
1. X_API bool YAP_RestartGoal(void):
1. X_API bool YAP_ShutdownGoal(int backtrack):
1. X_API bool YAP_ContinueGoal(void):
1. X_API void YAP_PruneGoal(YAP_dogoalinfo *gi):
1. X_API bool YAP_GoalHasException(Term *t):
1. X_API void YAP_ClearExceptions(void):
1. X_API int YAP_InitConsult(int mode, const char fname, char full, int osnop, char dir):
1. X_API void * YAP_GetStreamFromId(int no): : given a stream descriptor or stream alias (see open/3), return YAP's internal handle.
1. X_API FILE * YAP_TermToStream(Term t):
1. X_API void YAP_EndConsult(int sno, int osnop, const char full, char *dir):
1. X_API Term YAP_Read(FILE *f): : read a Prolog term from an operating system stream $s$.
1. X_API Term YAP_ReadFromStream(int sno): : read a Prolog term from a Prolog opened stream $s$.
Check YAP_OpenStream() for how to open Prolog streams in C
.
1. X_API Term YAP_ReadClauseFromStream(int sno, Term vs, Term pos):
1. X_API void YAP_Write(Term t, FILE *f, int flags):
1. X_API YAP_Term YAP_CopyTerm(Term t):
1. X_API char * YAP_WriteBuffer(Term t, char *buf, size_t sze, int flags):
1. X_API char * YAP_WriteDynamicBuffer(YAP_Term t, encoding_t enc, int flags): : write a a term to n user-provided buffer: make sure not tp overflow the buffer even if the text is much larger.
1. X_API bool YAP_CompileClause(Term t):
1. X_API void YAP_PutValue(YAP_Atom at, Term t):
1. X_API Term YAP_GetValue(YAP_Atom at):
1. X_API int YAP_CompareTerms(Term t1, Term t2):
1. X_API int YAP_Reset(yap_reset_t mode, bool reset_global):
1. X_API void YAP_Exit(int retval):
1. X_API int YAP_InitSocks(const char *host, long port):
1. X_API void YAP_SetOutputMessage(void):
1. X_API int YAP_StreamToFileNo(Term t):
1. X_API void * YAP_RepStreamFromId(int sno): : Obtain a pointer to the YAP representation of a stream.
Utility routine to Obtain a pointer to the YAP representation of a stream.
snoStream Id
return:
data structure for stream
1. X_API void YAP_CloseAllOpenStreams(void):
1. X_API void YAP_FlushAllStreams(void):
1. X_API void YAP_Throw(Term t):
1. X_API void YAP_AsyncThrow(Term t):
1. X_API void YAP_Halt(int i):
1. X_API CELL * YAP_TopOfLocalStack(void):
1. X_API void * YAP_Predicate(YAP_Atom a, UInt arity, Term m):
1. X_API void YAP_PredicateInfo(void p, YAP_Atom a, UInt arity, Term m):
1. X_API void YAP_UserCPredicate(const char *name, YAP_UserCPred def, YAP_Arity arity):
1. X_API void YAP_UserBackCPredicate_(const char *name, YAP_UserCPred init, YAP_UserCPred cont, YAP_Arity arity, YAP_Arity extra):
1. X_API void YAP_UserBackCutCPredicate(const char *name, YAP_UserCPred init, YAP_UserCPred cont, YAP_UserCPred cut, YAP_Arity arity, YAP_Arity extra):
1. X_API void YAP_UserBackCPredicate(const char *name, YAP_UserCPred init, YAP_UserCPred cont, arity_t arity, arity_t extra):
1. X_API void YAP_UserCPredicateWithArgs(const char *a, YAP_UserCPred f, arity_t arity, Term mod):
1. X_API Term YAP_CurrentModule(void):
1. X_API Term YAP_SetCurrentModule(Term new):
1. X_API Term YAP_CreateModule(YAP_Atom at):
1. X_API Term YAP_StripModule(Term t, Term *modp):
1. X_API int YAP_ThreadSelf(void):
1. X_API int YAP_ThreadCreateEngine(struct YAP_thread_attr_struct *attr):
1. X_API int YAP_ThreadAttachEngine(int wid):
1. X_API int YAP_ThreadDetachEngine(int wid):
1. X_API int YAP_ThreadDestroyEngine(int wid):
1. X_API Term YAP_TermNil(void):
1. X_API int YAP_IsTermNil(Term t):
1. X_API int YAP_AtomGetHold(YAP_Atom at):
1. X_API int YAP_AtomReleaseHold(YAP_Atom at):
1. X_API YAP_agc_hook YAP_AGCRegisterHook(YAP_agc_hook hook):
1. X_API int YAP_HaltRegisterHook(HaltHookFunc hook, void *closure):
1. X_API char * YAP_cwd(void):
1. X_API Term YAP_FloatsToList(double *dblp, size_t sz):
1. X_API Int YAP_ListToFloats(Term t, double *dblp, size_t sz):
1. X_API Term YAP_IntsToList(Int *dblp, size_t sz):
1. X_API Int YAP_ListToInts(Term t, Int *dblp, size_t sz):
1. X_API Term YAP_OpenList(int n):
1. X_API Term YAP_ExtendList(Term t0, Term inp):
1. X_API int YAP_CloseList(Term t0, Term tail):
1. X_API int YAP_IsAttVar(Term t):
1. X_API Term YAP_AttsOfVar(Term t):
1. X_API int YAP_FileNoFromStream(Term t):
1. X_API void * YAP_FileDescriptorFromStream(Term t):
1. X_API void * YAP_Record(Term t):
1. X_API Term YAP_Recorded(void *handle):
1. X_API int YAP_Erase(void *handle):
1. X_API void YAP_SlotsToArgs(int n, yhandle_t slot):
1. X_API void YAP_signal(int sig):
1. X_API int YAP_SetYAPFlag(Term flag, Term val):
1. X_API yhandle_t YAP_VarSlotToNumber(yhandle_t s):
1. X_API Term YAP_ModuleUser(void):
1. X_API YAP_handle_t YAP_NumberOfClausesForPredicate(YAP_PredEntryPtr ape):
1. X_API int YAP_MaxOpPriority(YAP_Atom at, Term module):
1. X_API int YAP_OpInfo(YAP_Atom at, Term module, int opkind, int yap_type, int prio):
1. X_API int YAP_Argv(char argvp)*:
1. X_API YAP_tag_t YAP_TagOfTerm(Term t):
1. X_API void * YAP_PointerOfTerm(Term t):
1. X_API size_t YAP_UTF8_TextLength(Term t): : Output the number of bytes needed to represent a string in UTF-8 Note that the terminating zero is not included.
No error checking is performed (the programmer should have that done).
ta list of codes, chars, string or atom.
return:
a positive number with the size, or 0.
1. X_API Int YAP_ListLength(Term t):
1. X_API Int YAP_NumberVars(Term t, Int nbv):
1. X_API Term YAP_UnNumberVars(Term t):
1. X_API int YAP_IsNumberedVariable(Term t):
1. X_API size_t YAP_ExportTerm(Term inp, char *buf, size_t len):
1. X_API Term YAP_ImportTerm(char *buf):
1. X_API size_t YAP_SizeOfExportedTerm(char *buf):
1. X_API Term YAP_ImportTfunnumberm(char *buf):
1. X_API int YAP_RequiresExtraStack(size_t sz):
1. X_API Int YAP_AtomToInt(YAP_Atom At):
1. X_API Int YAP_FunctorToInt(YAP_Functor f):
1. X_API void * YAP_foreign_stream(int sno):
1. X_API YAP_Functor YAP_IntToFunctor(Int i):
1. X_API YAP_PredEntryPtr YAP_TopGoal(void):
Var:¶
1. Term YAP_BPROLOG_curr_toam_status:
1. size_t MaxAtomTranslations:
1. size_t FunctorTranslations:
1. size_t MaxFunctorTranslations:
Typedef:¶
1. typedef Int(* CPredicate0) (void))(void):
1. typedef Int(* CPredicate1) (yhandle_t))(yhandle_t):
1. typedef Int(* CPredicate2) (yhandle_t, yhandle_t))(yhandle_t, yhandle_t):
1. typedef Int(* CPredicate3) (yhandle_t, yhandle_t, yhandle_t))(yhandle_t, yhandle_t, yhandle_t):
1. typedef Int(* CPredicate4) (yhandle_t, yhandle_t, yhandle_t, yhandle_t))(yhandle_t, yhandle_t, yhandle_t, yhandle_t):
1. typedef Int(* CPredicate5) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t))(yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t):
1. typedef Int(* CPredicate6) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t))(yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t):
1. typedef Int(* CPredicate7) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t))(yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t):
1. typedef Int(* CPredicate8) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t))(yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t):
1. typedef Int(* CPredicate9) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t))(yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t):
1. typedef Int(* CPredicate10) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t))(yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t):
1. typedef Int( CPredicateV) (yhandle_t, yhandle_t, struct foreign_context ))(yhandle_t, yhandle_t, struct foreign_context *):
1. typedef uintptr_t( CBPredicate0) (struct foreign_context ))(struct foreign_context *):
1. typedef uintptr_t( CBPredicate1) (yhandle_t, struct foreign_context ))(yhandle_t, struct foreign_context *):
1. typedef uintptr_t( CBPredicate2) (yhandle_t, yhandle_t, struct foreign_context ))(yhandle_t, yhandle_t, struct foreign_context *):
1. typedef uintptr_t( CBPredicate3) (yhandle_t, yhandle_t, yhandle_t, struct foreign_context ))(yhandle_t, yhandle_t, yhandle_t, struct foreign_context *):
1. typedef uintptr_t( CBPredicate4) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context ))(yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *):
1. typedef uintptr_t( CBPredicate5) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context ))(yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *):
1. typedef uintptr_t( CBPredicate6) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context ))(yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *):
1. typedef uintptr_t( CBPredicate7) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context ))(yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *):
1. typedef uintptr_t( CBPredicate8) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context ))(yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *):
1. typedef uintptr_t( CBPredicate9) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context ))(yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *):
1. typedef uintptr_t( CBPredicate10) (yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context ))(yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, yhandle_t, struct foreign_context *):