diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-09-19 08:31:49 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-09-19 08:31:49 (GMT) |
commit | 58467a7afe9d9eb62bb1da4d29690223a3681c16 (patch) | |
tree | f3d03464a4413a740adab6f5a035d504080e22d1 /generic/tclProc.c | |
parent | 0e29fdc2804213b9db0893953d861250c9497500 (diff) | |
download | tcl-58467a7afe9d9eb62bb1da4d29690223a3681c16.zip tcl-58467a7afe9d9eb62bb1da4d29690223a3681c16.tar.gz tcl-58467a7afe9d9eb62bb1da4d29690223a3681c16.tar.bz2 |
New (internal) function TclGetObjInterpProc2() and macro TclObjInterpProc2. Will be needed for Itcl (in combination with TIP #626). Should have been part of TIP #627.
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r-- | generic/tclProc.c | 53 |
1 files changed, 48 insertions, 5 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c index 059e751..f826a14 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -1682,6 +1682,43 @@ TclNRInterpProc( } return TclNRInterpProcCore(interp, objv[0], 1, &MakeProcError); } + +static int +NRInterpProc2( + ClientData clientData, /* Record describing procedure to be + * interpreted. */ + Tcl_Interp *interp,/* Interpreter in which procedure was + * invoked. */ + size_t objc, /* Count of number of arguments to this + * procedure. */ + Tcl_Obj *const objv[]) /* Argument value objects. */ +{ + int result = TclPushProcCallFrame(clientData, interp, objc, objv, + /*isLambda*/ 0); + + if (result != TCL_OK) { + return TCL_ERROR; + } + return TclNRInterpProcCore(interp, objv[0], 1, &MakeProcError); +} + +static int +ObjInterpProc2( + ClientData clientData, /* Record describing procedure to be + * interpreted. */ + Tcl_Interp *interp,/* Interpreter in which procedure was + * invoked. */ + size_t objc, /* Count of number of arguments to this + * procedure. */ + Tcl_Obj *const objv[]) /* Argument value objects. */ +{ + /* + * Not used much in the core; external interface for iTcl + */ + + return Tcl_NRCallObjProc2(interp, NRInterpProc2, clientData, objc, objv); +} + /* *---------------------------------------------------------------------- @@ -2273,12 +2310,12 @@ TclUpdateReturnInfo( /* *---------------------------------------------------------------------- * - * TclGetObjInterpProc -- + * TclGetObjInterpProc/TclGetObjInterpProc2 -- * - * Returns a pointer to the TclObjInterpProc function; this is different - * from the value obtained from the TclObjInterpProc reference on systems - * like Windows where import and export versions of a function exported - * by a DLL exist. + * Returns a pointer to the TclObjInterpProc/ObjInterpProc2 functions; + * this is different from the value obtained from the TclObjInterpProc + * reference on systems like Windows where import and export versions + * of a function exported by a DLL exist. * * Results: * Returns the internal address of the TclObjInterpProc function. @@ -2294,6 +2331,12 @@ TclGetObjInterpProc(void) { return TclObjInterpProc; } + +Tcl_ObjCmdProc2 * +TclGetObjInterpProc2(void) +{ + return ObjInterpProc2; +} /* *---------------------------------------------------------------------- |