summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclCompile.h2
-rw-r--r--generic/tclInt.decls6
-rw-r--r--[-rwxr-xr-x]generic/tclIntDecls.h6
-rw-r--r--generic/tclLiteral.c3
-rw-r--r--[-rwxr-xr-x]generic/tclOODecls.h0
-rw-r--r--[-rwxr-xr-x]generic/tclStubInit.c1
6 files changed, 15 insertions, 3 deletions
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index 8e3a767..959c2af 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -1079,8 +1079,6 @@ MODULE_SCOPE void TclPushVarName(Tcl_Interp *interp,
Tcl_Token *varTokenPtr, CompileEnv *envPtr,
int flags, int *localIndexPtr,
int *isScalarPtr);
-MODULE_SCOPE int TclRegisterLiteral(CompileEnv *envPtr,
- char *bytes, int length, int flags);
MODULE_SCOPE void TclReleaseLiteral(Tcl_Interp *interp, Tcl_Obj *objPtr);
MODULE_SCOPE void TclInvalidateCmdLiteral(Tcl_Interp *interp,
const char *name, Namespace *nsPtr);
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 244a7b2..31c8379 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -1021,6 +1021,12 @@ declare 249 {
declare 250 {
void TclSetSlaveCancelFlags(Tcl_Interp *interp, int flags, int force)
}
+
+# Allow extensions for optimization
+declare 251 {
+ int TclRegisterLiteral(void *envPtr,
+ char *bytes, int length, int flags)
+}
##############################################################################
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index 286f318..7b0a0e0 100755..100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.h
@@ -546,6 +546,9 @@ TCLAPI char * TclDoubleDigits(double dv, int ndigits, int flags,
/* 250 */
TCLAPI void TclSetSlaveCancelFlags(Tcl_Interp *interp, int flags,
int force);
+/* 251 */
+TCLAPI int TclRegisterLiteral(void *envPtr, char *bytes,
+ int length, int flags);
typedef struct TclIntStubs {
int magic;
@@ -802,6 +805,7 @@ typedef struct TclIntStubs {
int (*tclCopyChannel) (Tcl_Interp *interp, Tcl_Channel inChan, Tcl_Channel outChan, Tcl_WideInt toRead, Tcl_Obj *cmdPtr); /* 248 */
char * (*tclDoubleDigits) (double dv, int ndigits, int flags, int *decpt, int *signum, char **endPtr); /* 249 */
void (*tclSetSlaveCancelFlags) (Tcl_Interp *interp, int flags, int force); /* 250 */
+ int (*tclRegisterLiteral) (void *envPtr, char *bytes, int length, int flags); /* 251 */
} TclIntStubs;
extern const TclIntStubs *tclIntStubsPtr;
@@ -1206,6 +1210,8 @@ extern const TclIntStubs *tclIntStubsPtr;
(tclIntStubsPtr->tclDoubleDigits) /* 249 */
#define TclSetSlaveCancelFlags \
(tclIntStubsPtr->tclSetSlaveCancelFlags) /* 250 */
+#define TclRegisterLiteral \
+ (tclIntStubsPtr->tclRegisterLiteral) /* 251 */
#endif /* defined(USE_TCL_STUBS) */
diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c
index 11da6f8..2b0cc7e 100644
--- a/generic/tclLiteral.c
+++ b/generic/tclLiteral.c
@@ -358,7 +358,7 @@ TclFetchLiteral(
int
TclRegisterLiteral(
- CompileEnv *envPtr, /* Points to the CompileEnv in whose object
+ void *ePtr, /* Points to the CompileEnv in whose object
* array an object is found or created. */
register char *bytes, /* Points to string for which to find or
* create an object in CompileEnv's object
@@ -372,6 +372,7 @@ TclRegisterLiteral(
* the literal should not be shared accross
* namespaces. */
{
+ CompileEnv *envPtr = ePtr;
Interp *iPtr = envPtr->iPtr;
LiteralTable *localTablePtr = &envPtr->localLitTable;
LiteralEntry *globalPtr, *localPtr;
diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h
index 1de3e92..1de3e92 100755..100644
--- a/generic/tclOODecls.h
+++ b/generic/tclOODecls.h
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index b430456..b64edb4 100755..100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -511,6 +511,7 @@ static const TclIntStubs tclIntStubs = {
TclCopyChannel, /* 248 */
TclDoubleDigits, /* 249 */
TclSetSlaveCancelFlags, /* 250 */
+ TclRegisterLiteral, /* 251 */
};
static const TclIntPlatStubs tclIntPlatStubs = {