summaryrefslogtreecommitdiffstats
path: root/generic/tclStubInit.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclStubInit.c')
-rw-r--r--generic/tclStubInit.c85
1 files changed, 64 insertions, 21 deletions
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 85dfe1c..feae0e2 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -70,6 +70,49 @@ int TclSockMinimumBuffersOld(sock, size)
}
#endif
+#define TclBackgroundException backgroundException
+static void TclBackgroundException(interp, code)
+ Tcl_Interp *interp;
+ int code;
+{
+ if (code != TCL_OK) {
+ Tcl_BackgroundError(interp);
+ }
+}
+#define TclCanceled canceled
+static int TclCanceled(interp)
+ Tcl_Interp *interp;
+{
+ return TCL_OK;
+}
+#define TclGetErrorLine getErrorLine
+static int TclGetErrorLine(interp)
+ Tcl_Interp *interp;
+{
+ return interp->errorLine;
+}
+#define TclSetErrorLine setErrorLine
+static void TclSetErrorLine(interp, lineNum)
+ Tcl_Interp *interp;
+ int lineNum;
+{
+ interp->errorLine = lineNum;
+}
+#define TclSetStartupScript setStartupScript
+static void TclSetStartupScript(path, encoding)
+ Tcl_Obj *path;
+ CONST char *encoding;
+{
+ TclSetStartupScriptPath(path);
+}
+#define TclGetStartupScript getStartupScript
+static Tcl_Obj *TclGetStartupScript(encodingPtr)
+ CONST char **encodingPtr;
+{
+ if (encodingPtr) *encodingPtr = NULL;
+ return TclGetStartupScriptPath();
+}
+
#ifdef __WIN32__
# define TclUnixWaitForFile 0
# define TclpReaddir 0
@@ -384,8 +427,8 @@ TclIntStubs tclIntStubs = {
NULL, /* 175 */
NULL, /* 176 */
NULL, /* 177 */
- NULL, /* 178 */
- NULL, /* 179 */
+ TclSetStartupScript, /* 178 */
+ TclGetStartupScript, /* 179 */
NULL, /* 180 */
NULL, /* 181 */
TclpLocaltime, /* 182 */
@@ -442,7 +485,7 @@ TclIntStubs tclIntStubs = {
NULL, /* 233 */
NULL, /* 234 */
NULL, /* 235 */
- NULL, /* 236 */
+ TclBackgroundException, /* 236 */
NULL, /* 237 */
NULL, /* 238 */
NULL, /* 239 */
@@ -1111,18 +1154,18 @@ TclStubs tclStubs = {
NULL, /* 503 */
NULL, /* 504 */
NULL, /* 505 */
- NULL, /* 506 */
- NULL, /* 507 */
- NULL, /* 508 */
- NULL, /* 509 */
- NULL, /* 510 */
- NULL, /* 511 */
- NULL, /* 512 */
- NULL, /* 513 */
- NULL, /* 514 */
- NULL, /* 515 */
- NULL, /* 516 */
- NULL, /* 517 */
+ Tcl_CreateNamespace, /* 506 */
+ Tcl_DeleteNamespace, /* 507 */
+ Tcl_AppendExportList, /* 508 */
+ Tcl_Export, /* 509 */
+ Tcl_Import, /* 510 */
+ Tcl_ForgetImport, /* 511 */
+ Tcl_GetCurrentNamespace, /* 512 */
+ Tcl_GetGlobalNamespace, /* 513 */
+ Tcl_FindNamespace, /* 514 */
+ Tcl_FindCommand, /* 515 */
+ Tcl_GetCommandFromObj, /* 516 */
+ Tcl_GetCommandFullName, /* 517 */
NULL, /* 518 */
NULL, /* 519 */
NULL, /* 520 */
@@ -1186,7 +1229,7 @@ TclStubs tclStubs = {
NULL, /* 578 */
NULL, /* 579 */
NULL, /* 580 */
- NULL, /* 581 */
+ TclCanceled, /* 581 */
NULL, /* 582 */
NULL, /* 583 */
NULL, /* 584 */
@@ -1210,11 +1253,11 @@ TclStubs tclStubs = {
NULL, /* 602 */
NULL, /* 603 */
NULL, /* 604 */
- NULL, /* 605 */
- NULL, /* 606 */
+ TclGetErrorLine, /* 605 */
+ TclSetErrorLine, /* 606 */
NULL, /* 607 */
NULL, /* 608 */
- NULL, /* 609 */
+ TclBackgroundException, /* 609 */
NULL, /* 610 */
NULL, /* 611 */
NULL, /* 612 */
@@ -1227,8 +1270,8 @@ TclStubs tclStubs = {
NULL, /* 619 */
NULL, /* 620 */
NULL, /* 621 */
- NULL, /* 622 */
- NULL, /* 623 */
+ TclSetStartupScript, /* 622 */
+ TclGetStartupScript, /* 623 */
NULL, /* 624 */
NULL, /* 625 */
NULL, /* 626 */