diff options
author | andreas_kupries <akupries@shaw.ca> | 2001-10-15 20:26:57 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2001-10-15 20:26:57 (GMT) |
commit | cf2f280c08cae3a18c4d328877f8fbf638de36bf (patch) | |
tree | a2743ac61001b229d56edcfeb695809658593efd /generic | |
parent | d83f436f3c6920fd6099965bbf44f874a9310a12 (diff) | |
download | tcl-cf2f280c08cae3a18c4d328877f8fbf638de36bf.zip tcl-cf2f280c08cae3a18c4d328877f8fbf638de36bf.tar.gz tcl-cf2f280c08cae3a18c4d328877f8fbf638de36bf.tar.bz2 |
* generic/tclInt.decls (TclExpandCodeArray,TclGetInstructionTable):
Added to internal stubs table. Tclcompiler (Tclpro project)
needs them if used as loadable package under Windows. Changed
signatures. We don't want to describe compiler internal
structures in "tclInt.h".
* generic/tclCompile.h: S.a. Removed function declarations.
* generic/tclCompile.c: S.a. Adapted to changed signatures.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCompile.c | 11 | ||||
-rw-r--r-- | generic/tclCompile.h | 5 | ||||
-rw-r--r-- | generic/tclInt.decls | 22 | ||||
-rw-r--r-- | generic/tclIntDecls.h | 20 | ||||
-rw-r--r-- | generic/tclStubInit.c | 6 |
5 files changed, 49 insertions, 15 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 3435990..539cb9b 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.25 2001/09/19 18:18:16 hobbs Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.26 2001/10/15 20:26:57 andreas_kupries Exp $ */ #include "tclInt.h" @@ -1942,10 +1942,13 @@ TclInitCompiledLocals(interp, framePtr, nsPtr) */ void -TclExpandCodeArray(envPtr) - CompileEnv *envPtr; /* Points to the CompileEnv whose code array +TclExpandCodeArray(envArgPtr) + void *envArgPtr; /* Points to the CompileEnv whose code array * must be enlarged. */ { + CompileEnv *envPtr = (CompileEnv*) envArgPtr; /* Points to the CompileEnv whose code array + * must be enlarged. */ + /* * envPtr->codeNext is equal to envPtr->codeEnd. The currently defined * code bytes are stored between envPtr->codeStart and @@ -2544,7 +2547,7 @@ TclFixupForwardJump(envPtr, jumpFixupPtr, jumpDist, distThreshold) *---------------------------------------------------------------------- */ -InstructionDesc * +void * /* == InstructionDesc* == */ TclGetInstructionTable() { return &instructionTable[0]; diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 57b24fe..fb922bc 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -7,7 +7,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.16 2001/09/17 11:51:58 msofer Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.17 2001/10/15 20:26:57 andreas_kupries Exp $ */ #ifndef _TCLCOMPILATION @@ -775,11 +775,8 @@ EXTERN void TclEmitForwardJump _ANSI_ARGS_((CompileEnv *envPtr, EXTERN ExceptionRange * TclGetExceptionRangeForPc _ANSI_ARGS_(( unsigned char *pc, int catchOnly, ByteCode* codePtr)); -EXTERN InstructionDesc * TclGetInstructionTable _ANSI_ARGS_(()); EXTERN int TclExecuteByteCode _ANSI_ARGS_((Tcl_Interp *interp, ByteCode *codePtr)); -EXTERN void TclExpandCodeArray _ANSI_ARGS_(( - CompileEnv *envPtr)); EXTERN void TclExpandJumpFixupArray _ANSI_ARGS_(( JumpFixupArray *fixupArrayPtr)); EXTERN void TclFinalizeAuxDataTypeTable _ANSI_ARGS_((void)); diff --git a/generic/tclInt.decls b/generic/tclInt.decls index c179a9b..c7aaa0a 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.34 2001/09/27 20:32:35 dgp Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.35 2001/10/15 20:26:57 andreas_kupries Exp $ library tcl @@ -624,8 +624,26 @@ declare 161 generic { declare 162 generic { void TclChannelEventScriptInvoker(ClientData clientData, int flags) } -# These functions are vfs aware, but are generally only useful internally. + +# ALERT: The result of 'TclGetInstructionTable' is actually an +# "InstructionDesc*" but we do not want to describe this structure in +# "tclInt.h". It is described in "tclCompile.h". Use a cast to the +# correct type when calling this procedure. + declare 163 generic { + void * TclGetInstructionTable (void) +} + +# ALERT: The argument of 'TclExpandCodeArray' is actually a +# "CompileEnv*" but we do not want to describe this structure in +# "tclInt.h". It is described in "tclCompile.h". + +declare 164 generic { + void TclExpandCodeArray (void *envPtr) +} + +# These functions are vfs aware, but are generally only useful internally. +declare 165 generic { void TclpSetInitialEncodings(void) } diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index e470c1c..99b8909 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.29 2001/09/27 20:32:35 dgp Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.30 2001/10/15 20:26:57 andreas_kupries Exp $ */ #ifndef _TCLINTDECLS @@ -488,6 +488,10 @@ EXTERN int TclChannelTransform _ANSI_ARGS_((Tcl_Interp * interp, EXTERN void TclChannelEventScriptInvoker _ANSI_ARGS_(( ClientData clientData, int flags)); /* 163 */ +EXTERN void * TclGetInstructionTable _ANSI_ARGS_((void)); +/* 164 */ +EXTERN void TclExpandCodeArray _ANSI_ARGS_((void * envPtr)); +/* 165 */ EXTERN void TclpSetInitialEncodings _ANSI_ARGS_((void)); typedef struct TclIntStubs { @@ -689,7 +693,9 @@ typedef struct TclIntStubs { void *reserved160; int (*tclChannelTransform) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan, Tcl_Obj * cmdObjPtr)); /* 161 */ void (*tclChannelEventScriptInvoker) _ANSI_ARGS_((ClientData clientData, int flags)); /* 162 */ - void (*tclpSetInitialEncodings) _ANSI_ARGS_((void)); /* 163 */ + void * (*tclGetInstructionTable) _ANSI_ARGS_((void)); /* 163 */ + void (*tclExpandCodeArray) _ANSI_ARGS_((void * envPtr)); /* 164 */ + void (*tclpSetInitialEncodings) _ANSI_ARGS_((void)); /* 165 */ } TclIntStubs; #ifdef __cplusplus @@ -1282,9 +1288,17 @@ extern TclIntStubs *tclIntStubsPtr; #define TclChannelEventScriptInvoker \ (tclIntStubsPtr->tclChannelEventScriptInvoker) /* 162 */ #endif +#ifndef TclGetInstructionTable +#define TclGetInstructionTable \ + (tclIntStubsPtr->tclGetInstructionTable) /* 163 */ +#endif +#ifndef TclExpandCodeArray +#define TclExpandCodeArray \ + (tclIntStubsPtr->tclExpandCodeArray) /* 164 */ +#endif #ifndef TclpSetInitialEncodings #define TclpSetInitialEncodings \ - (tclIntStubsPtr->tclpSetInitialEncodings) /* 163 */ + (tclIntStubsPtr->tclpSetInitialEncodings) /* 165 */ #endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 2a1fbfb..6b59f55 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.61 2001/09/13 11:56:20 msofer Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.62 2001/10/15 20:26:58 andreas_kupries Exp $ */ #include "tclInt.h" @@ -242,7 +242,9 @@ TclIntStubs tclIntStubs = { NULL, /* 160 */ TclChannelTransform, /* 161 */ TclChannelEventScriptInvoker, /* 162 */ - TclpSetInitialEncodings, /* 163 */ + TclGetInstructionTable, /* 163 */ + TclExpandCodeArray, /* 164 */ + TclpSetInitialEncodings, /* 165 */ }; TclIntPlatStubs tclIntPlatStubs = { |