|
|
|
|
|
|
|
|
|
#ifndef _ITCLDECLS |
|
#define _ITCLDECLS |
|
|
|
#if defined(USE_ITCL_STUBS) |
|
|
|
ITCLAPI const char *Itcl_InitStubs( |
|
Tcl_Interp *, const char *version, int exact); |
|
#else |
|
|
|
#define Itcl_InitStubs(interp, version, exact) Tcl_PkgRequireEx(interp,"itcl",version,exact,NULL) |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#define ITCL_STUBS_EPOCH 0 |
|
#define ITCL_STUBS_REVISION 152 |
|
|
|
#ifdef __cplusplus |
|
extern "C" { |
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ITCLAPI int Itcl_RegisterC(Tcl_Interp *interp, const char *name, |
|
Tcl_CmdProc *proc, void *clientData, |
|
Tcl_CmdDeleteProc *deleteProc); |
|
|
|
ITCLAPI int Itcl_RegisterObjC(Tcl_Interp *interp, |
|
const char *name, Tcl_ObjCmdProc *proc, |
|
void *clientData, |
|
Tcl_CmdDeleteProc *deleteProc); |
|
|
|
ITCLAPI int Itcl_FindC(Tcl_Interp *interp, const char *name, |
|
Tcl_CmdProc **argProcPtr, |
|
Tcl_ObjCmdProc **objProcPtr, void **cDataPtr); |
|
|
|
ITCLAPI void Itcl_InitStack(Itcl_Stack *stack); |
|
|
|
ITCLAPI void Itcl_DeleteStack(Itcl_Stack *stack); |
|
|
|
ITCLAPI void Itcl_PushStack(void *cdata, Itcl_Stack *stack); |
|
|
|
ITCLAPI void * Itcl_PopStack(Itcl_Stack *stack); |
|
|
|
ITCLAPI void * Itcl_PeekStack(Itcl_Stack *stack); |
|
|
|
ITCLAPI void * Itcl_GetStackValue(Itcl_Stack *stack, Tcl_Size pos); |
|
|
|
ITCLAPI void Itcl_InitList(Itcl_List *listPtr); |
|
|
|
ITCLAPI void Itcl_DeleteList(Itcl_List *listPtr); |
|
|
|
ITCLAPI Itcl_ListElem * Itcl_CreateListElem(Itcl_List *listPtr); |
|
|
|
ITCLAPI Itcl_ListElem * Itcl_DeleteListElem(Itcl_ListElem *elemPtr); |
|
|
|
ITCLAPI Itcl_ListElem * Itcl_InsertList(Itcl_List *listPtr, void *val); |
|
|
|
ITCLAPI Itcl_ListElem * Itcl_InsertListElem(Itcl_ListElem *pos, void *val); |
|
|
|
ITCLAPI Itcl_ListElem * Itcl_AppendList(Itcl_List *listPtr, void *val); |
|
|
|
ITCLAPI Itcl_ListElem * Itcl_AppendListElem(Itcl_ListElem *pos, void *val); |
|
|
|
ITCLAPI void Itcl_SetListValue(Itcl_ListElem *elemPtr, void *val); |
|
|
|
ITCLAPI void Itcl_EventuallyFree(void *cdata, Tcl_FreeProc *fproc); |
|
|
|
ITCLAPI void Itcl_PreserveData(void *cdata); |
|
|
|
ITCLAPI void Itcl_ReleaseData(void *cdata); |
|
|
|
ITCLAPI Itcl_InterpState Itcl_SaveInterpState(Tcl_Interp *interp, int status); |
|
|
|
ITCLAPI int Itcl_RestoreInterpState(Tcl_Interp *interp, |
|
Itcl_InterpState state); |
|
|
|
ITCLAPI void Itcl_DiscardInterpState(Itcl_InterpState state); |
|
|
|
ITCLAPI void * Itcl_Alloc(size_t size); |
|
|
|
ITCLAPI void Itcl_Free(void *ptr); |
|
|
|
typedef struct { |
|
const struct ItclIntStubs *itclIntStubs; |
|
} ItclStubHooks; |
|
|
|
typedef struct ItclStubs { |
|
int magic; |
|
int epoch; |
|
int revision; |
|
const ItclStubHooks *hooks; |
|
|
|
void (*reserved0)(void); |
|
void (*reserved1)(void); |
|
int (*itcl_RegisterC) (Tcl_Interp *interp, const char *name, Tcl_CmdProc *proc, void *clientData, Tcl_CmdDeleteProc *deleteProc); |
|
int (*itcl_RegisterObjC) (Tcl_Interp *interp, const char *name, Tcl_ObjCmdProc *proc, void *clientData, Tcl_CmdDeleteProc *deleteProc); |
|
int (*itcl_FindC) (Tcl_Interp *interp, const char *name, Tcl_CmdProc **argProcPtr, Tcl_ObjCmdProc **objProcPtr, void **cDataPtr); |
|
void (*itcl_InitStack) (Itcl_Stack *stack); |
|
void (*itcl_DeleteStack) (Itcl_Stack *stack); |
|
void (*itcl_PushStack) (void *cdata, Itcl_Stack *stack); |
|
void * (*itcl_PopStack) (Itcl_Stack *stack); |
|
void * (*itcl_PeekStack) (Itcl_Stack *stack); |
|
void * (*itcl_GetStackValue) (Itcl_Stack *stack, Tcl_Size pos); |
|
void (*itcl_InitList) (Itcl_List *listPtr); |
|
void (*itcl_DeleteList) (Itcl_List *listPtr); |
|
Itcl_ListElem * (*itcl_CreateListElem) (Itcl_List *listPtr); |
|
Itcl_ListElem * (*itcl_DeleteListElem) (Itcl_ListElem *elemPtr); |
|
Itcl_ListElem * (*itcl_InsertList) (Itcl_List *listPtr, void *val); |
|
Itcl_ListElem * (*itcl_InsertListElem) (Itcl_ListElem *pos, void *val); |
|
Itcl_ListElem * (*itcl_AppendList) (Itcl_List *listPtr, void *val); |
|
Itcl_ListElem * (*itcl_AppendListElem) (Itcl_ListElem *pos, void *val); |
|
void (*itcl_SetListValue) (Itcl_ListElem *elemPtr, void *val); |
|
void (*itcl_EventuallyFree) (void *cdata, Tcl_FreeProc *fproc); |
|
void (*itcl_PreserveData) (void *cdata); |
|
void (*itcl_ReleaseData) (void *cdata); |
|
Itcl_InterpState (*itcl_SaveInterpState) (Tcl_Interp *interp, int status); |
|
int (*itcl_RestoreInterpState) (Tcl_Interp *interp, Itcl_InterpState state); |
|
void (*itcl_DiscardInterpState) (Itcl_InterpState state); |
|
void * (*itcl_Alloc) (size_t size); |
|
void (*itcl_Free) (void *ptr); |
|
} ItclStubs; |
|
|
|
extern const ItclStubs *itclStubsPtr; |
|
|
|
#ifdef __cplusplus |
|
} |
|
#endif |
|
|
|
#if defined(USE_ITCL_STUBS) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define Itcl_RegisterC \ |
|
(itclStubsPtr->itcl_RegisterC) |
|
#define Itcl_RegisterObjC \ |
|
(itclStubsPtr->itcl_RegisterObjC) |
|
#define Itcl_FindC \ |
|
(itclStubsPtr->itcl_FindC) |
|
#define Itcl_InitStack \ |
|
(itclStubsPtr->itcl_InitStack) |
|
#define Itcl_DeleteStack \ |
|
(itclStubsPtr->itcl_DeleteStack) |
|
#define Itcl_PushStack \ |
|
(itclStubsPtr->itcl_PushStack) |
|
#define Itcl_PopStack \ |
|
(itclStubsPtr->itcl_PopStack) |
|
#define Itcl_PeekStack \ |
|
(itclStubsPtr->itcl_PeekStack) |
|
#define Itcl_GetStackValue \ |
|
(itclStubsPtr->itcl_GetStackValue) |
|
#define Itcl_InitList \ |
|
(itclStubsPtr->itcl_InitList) |
|
#define Itcl_DeleteList \ |
|
(itclStubsPtr->itcl_DeleteList) |
|
#define Itcl_CreateListElem \ |
|
(itclStubsPtr->itcl_CreateListElem) |
|
#define Itcl_DeleteListElem \ |
|
(itclStubsPtr->itcl_DeleteListElem) |
|
#define Itcl_InsertList \ |
|
(itclStubsPtr->itcl_InsertList) |
|
#define Itcl_InsertListElem \ |
|
(itclStubsPtr->itcl_InsertListElem) |
|
#define Itcl_AppendList \ |
|
(itclStubsPtr->itcl_AppendList) |
|
#define Itcl_AppendListElem \ |
|
(itclStubsPtr->itcl_AppendListElem) |
|
#define Itcl_SetListValue \ |
|
(itclStubsPtr->itcl_SetListValue) |
|
#define Itcl_EventuallyFree \ |
|
(itclStubsPtr->itcl_EventuallyFree) |
|
#define Itcl_PreserveData \ |
|
(itclStubsPtr->itcl_PreserveData) |
|
#define Itcl_ReleaseData \ |
|
(itclStubsPtr->itcl_ReleaseData) |
|
#define Itcl_SaveInterpState \ |
|
(itclStubsPtr->itcl_SaveInterpState) |
|
#define Itcl_RestoreInterpState \ |
|
(itclStubsPtr->itcl_RestoreInterpState) |
|
#define Itcl_DiscardInterpState \ |
|
(itclStubsPtr->itcl_DiscardInterpState) |
|
#define Itcl_Alloc \ |
|
(itclStubsPtr->itcl_Alloc) |
|
#define Itcl_Free \ |
|
(itclStubsPtr->itcl_Free) |
|
|
|
#endif |
|
|
|
|
|
|
|
#endif |
|
|