summaryrefslogtreecommitdiffstats
path: root/generic/tclDecls.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-17 22:28:38 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-17 22:28:38 (GMT)
commitad5f7e54641391f59816162a8a53b2375e7222a0 (patch)
tree6046e84e87a076d9ed6ca1edf226832ffa7bd073 /generic/tclDecls.h
parent3b0f6c1c31151c22e22f431ed737a6a41f9c5494 (diff)
downloadtcl-ad5f7e54641391f59816162a8a53b2375e7222a0.zip
tcl-ad5f7e54641391f59816162a8a53b2375e7222a0.tar.gz
tcl-ad5f7e54641391f59816162a8a53b2375e7222a0.tar.bz2
Convert Tcl_Eval and Tcl_GlobalEval to a macro
Diffstat (limited to 'generic/tclDecls.h')
-rw-r--r--generic/tclDecls.h31
1 files changed, 15 insertions, 16 deletions
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index f28069b..b824e76 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -385,11 +385,9 @@ TCLAPI int Tcl_Eof(Tcl_Channel chan);
TCLAPI const char * Tcl_ErrnoId(void);
/* 128 */
TCLAPI const char * Tcl_ErrnoMsg(int err);
-/* 129 */
-TCLAPI int Tcl_Eval(Tcl_Interp *interp, const char *script);
+/* Slot 129 is reserved */
/* Slot 130 is reserved */
-/* 131 */
-TCLAPI int Tcl_EvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr);
+/* Slot 131 is reserved */
/* 132 */
TCLAPI void Tcl_EventuallyFree(ClientData clientData,
Tcl_FreeProc *freeProc);
@@ -1918,9 +1916,9 @@ typedef struct TclStubs {
int (*tcl_Eof) (Tcl_Channel chan); /* 126 */
const char * (*tcl_ErrnoId) (void); /* 127 */
const char * (*tcl_ErrnoMsg) (int err); /* 128 */
- int (*tcl_Eval) (Tcl_Interp *interp, const char *script); /* 129 */
+ void (*reserved129)(void);
void (*reserved130)(void);
- int (*tcl_EvalObj) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 131 */
+ void (*reserved131)(void);
void (*tcl_EventuallyFree) (ClientData clientData, Tcl_FreeProc *freeProc); /* 132 */
void (*tcl_Exit) (int status); /* 133 */
int (*tcl_ExposeCommand) (Tcl_Interp *interp, const char *hiddenCmdToken, const char *cmdName); /* 134 */
@@ -2712,11 +2710,9 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_ErrnoId) /* 127 */
#define Tcl_ErrnoMsg \
(tclStubsPtr->tcl_ErrnoMsg) /* 128 */
-#define Tcl_Eval \
- (tclStubsPtr->tcl_Eval) /* 129 */
+/* Slot 129 is reserved */
/* Slot 130 is reserved */
-#define Tcl_EvalObj \
- (tclStubsPtr->tcl_EvalObj) /* 131 */
+/* Slot 131 is reserved */
#define Tcl_EventuallyFree \
(tclStubsPtr->tcl_EventuallyFree) /* 132 */
#define Tcl_Exit \
@@ -3740,17 +3736,20 @@ TCLAPI void Tcl_MainExW(int argc, wchar_t **argv,
Tcl_PkgProvideEx(interp, name, version, NULL)
#define Tcl_PkgRequire(interp, name, version, exact) \
Tcl_PkgRequireEx(interp, name, version, exact, NULL)
+#define Tcl_Eval(interp,objPtr) \
+ Tcl_EvalEx((interp),(objPtr),-1,0)
+#define Tcl_GlobalEval(interp,objPtr) \
+ Tcl_EvalEx((interp),(objPtr),-1,TCL_EVAL_GLOBAL)
/*
* Deprecated Tcl procedures:
*/
-#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
-# undef Tcl_EvalObj
+
+#ifndef TCL_NO_DEPRECATED
# define Tcl_EvalObj(interp,objPtr) \
- Tcl_EvalObjEx((interp),(objPtr),0)
-# undef Tcl_GlobalEvalObj
+ Tcl_EvalObjEx((interp),(objPtr),0)
# define Tcl_GlobalEvalObj(interp,objPtr) \
- Tcl_EvalObjEx((interp),(objPtr),TCL_EVAL_GLOBAL)
-#endif
+ Tcl_EvalObjEx((interp),(objPtr),TCL_EVAL_GLOBAL)
+#endif /* !TCL_NO_DEPRECATED */
#endif /* _TCLDECLS */