jpayne@69
|
1 #ifndef ITCL_USE_MODIFIED_TCL_H
|
jpayne@69
|
2 /* this is just to provide the definition. This struct is only used if
|
jpayne@69
|
3 * infoPtr->useOldResolvers == 0 which is not the default
|
jpayne@69
|
4 */
|
jpayne@69
|
5 #define FRAME_HAS_RESOLVER 0x100
|
jpayne@69
|
6 typedef Tcl_Command (Tcl_CmdAliasProc)(Tcl_Interp *interp,
|
jpayne@69
|
7 Tcl_Namespace *nsPtr, const char *cmdName,
|
jpayne@69
|
8 void *clientData);
|
jpayne@69
|
9 typedef Tcl_Var (Tcl_VarAliasProc)(Tcl_Interp *interp,
|
jpayne@69
|
10 Tcl_Namespace *nsPtr, const char *varName,
|
jpayne@69
|
11 void *clientData);
|
jpayne@69
|
12
|
jpayne@69
|
13 #ifndef _TCL_RESOLVE_DEFINED
|
jpayne@69
|
14 typedef struct Tcl_Resolve {
|
jpayne@69
|
15 Tcl_VarAliasProc *varProcPtr;
|
jpayne@69
|
16 Tcl_CmdAliasProc *cmdProcPtr;
|
jpayne@69
|
17 void *clientData;
|
jpayne@69
|
18 } Tcl_Resolve;
|
jpayne@69
|
19 #define _TCL_RESOLVE_DEFINED 1
|
jpayne@69
|
20 #endif
|
jpayne@69
|
21 #endif
|
jpayne@69
|
22
|
jpayne@69
|
23 #ifndef _TCLINT
|
jpayne@69
|
24 struct Tcl_ResolvedVarInfo;
|
jpayne@69
|
25
|
jpayne@69
|
26 typedef Tcl_Var (Tcl_ResolveRuntimeVarProc)(Tcl_Interp *interp,
|
jpayne@69
|
27 struct Tcl_ResolvedVarInfo *vinfoPtr);
|
jpayne@69
|
28
|
jpayne@69
|
29 typedef void (Tcl_ResolveVarDeleteProc)(struct Tcl_ResolvedVarInfo *vinfoPtr);
|
jpayne@69
|
30
|
jpayne@69
|
31 /*
|
jpayne@69
|
32 * The following structure encapsulates the routines needed to resolve a
|
jpayne@69
|
33 * variable reference at runtime. Any variable specific state will typically
|
jpayne@69
|
34 * be appended to this structure.
|
jpayne@69
|
35 */
|
jpayne@69
|
36
|
jpayne@69
|
37 typedef struct Tcl_ResolvedVarInfo {
|
jpayne@69
|
38 Tcl_ResolveRuntimeVarProc *fetchProc;
|
jpayne@69
|
39 Tcl_ResolveVarDeleteProc *deleteProc;
|
jpayne@69
|
40 } Tcl_ResolvedVarInfo;
|
jpayne@69
|
41
|
jpayne@69
|
42 typedef int (Tcl_ResolveCompiledVarProc) (Tcl_Interp *interp,
|
jpayne@69
|
43 const char *name, Tcl_Size length, Tcl_Namespace *context,
|
jpayne@69
|
44 Tcl_ResolvedVarInfo **rPtr);
|
jpayne@69
|
45
|
jpayne@69
|
46 typedef int (Tcl_ResolveVarProc) (Tcl_Interp *interp, const char *name,
|
jpayne@69
|
47 Tcl_Namespace *context, int flags, Tcl_Var *rPtr);
|
jpayne@69
|
48
|
jpayne@69
|
49 typedef int (Tcl_ResolveCmdProc) (Tcl_Interp *interp, const char *name,
|
jpayne@69
|
50 Tcl_Namespace *context, int flags, Tcl_Command *rPtr);
|
jpayne@69
|
51
|
jpayne@69
|
52 typedef struct Tcl_ResolverInfo {
|
jpayne@69
|
53 Tcl_ResolveCmdProc *cmdResProc;
|
jpayne@69
|
54 /* Procedure handling command name
|
jpayne@69
|
55 * resolution. */
|
jpayne@69
|
56 Tcl_ResolveVarProc *varResProc;
|
jpayne@69
|
57 /* Procedure handling variable name resolution
|
jpayne@69
|
58 * for variables that can only be handled at
|
jpayne@69
|
59 * runtime. */
|
jpayne@69
|
60 Tcl_ResolveCompiledVarProc *compiledVarResProc;
|
jpayne@69
|
61 /* Procedure handling variable name resolution
|
jpayne@69
|
62 * at compile time. */
|
jpayne@69
|
63 } Tcl_ResolverInfo;
|
jpayne@69
|
64 #endif
|
jpayne@69
|
65
|
jpayne@69
|
66
|
jpayne@69
|
67 /* here come the definitions for code which should be migrated to Tcl core */
|
jpayne@69
|
68 /* these functions DO NOT exist and are not published */
|
jpayne@69
|
69 #ifndef _TCL_PROC_DEFINED
|
jpayne@69
|
70 typedef struct Tcl_Proc_ *Tcl_Proc;
|
jpayne@69
|
71 #define _TCL_PROC_DEFINED 1
|
jpayne@69
|
72 #endif
|
jpayne@69
|
73
|
jpayne@69
|
74 MODULE_SCOPE Tcl_Var Tcl_NewNamespaceVar(Tcl_Interp *interp, Tcl_Namespace *nsPtr,
|
jpayne@69
|
75 const char *varName);
|
jpayne@69
|
76 MODULE_SCOPE void Itcl_PreserveVar(Tcl_Var var);
|
jpayne@69
|
77 MODULE_SCOPE void Itcl_ReleaseVar(Tcl_Var var);
|
jpayne@69
|
78 MODULE_SCOPE int Itcl_IsCallFrameArgument(Tcl_Interp *interp, const char *name);
|
jpayne@69
|
79 MODULE_SCOPE size_t Itcl_GetCallVarFrameObjc(Tcl_Interp *interp);
|
jpayne@69
|
80 MODULE_SCOPE Tcl_Obj *const * Itcl_GetCallVarFrameObjv(Tcl_Interp *interp);
|
jpayne@69
|
81 #define Tcl_SetNamespaceResolver _Tcl_SetNamespaceResolver
|
jpayne@69
|
82 MODULE_SCOPE int _Tcl_SetNamespaceResolver(Tcl_Namespace *nsPtr,
|
jpayne@69
|
83 struct Tcl_Resolve *resolvePtr);
|