Index: generic/gentclAPI.decls =================================================================== diff -u -rdfcec445642ff230e91b3b087322ca02a2cdcceb -rf316e4ef5e27eedc5ed7cb1a4d90ff0d86b53ca8 --- generic/gentclAPI.decls (.../gentclAPI.decls) (revision dfcec445642ff230e91b3b087322ca02a2cdcceb) +++ generic/gentclAPI.decls (.../gentclAPI.decls) (revision f316e4ef5e27eedc5ed7cb1a4d90ff0d86b53ca8) @@ -88,6 +88,9 @@ {-argName "relationtype" -required 1 -type "mixin|instmixin|object-mixin|class-mixin|filter|instfilter|object-filter|class-filter|class|superclass|rootclass"} {-argName "value" -required 0 -type tclobj} } +xotclCmd self XOTclGetSelfObjCmd { + {-argName "selfoption" -required 0 -type "proc|class|activelevel|args|activemixin|calledproc|calledmethod|calledclass|callingproc|callingclass|callinglevel|callingobject|filterreg|isnextcall|next"} +} xotclCmd setinstvar XOTclSetInstvarCmd { {-argName "object" -required 1 -type object} {-argName "variable" -required 1 -type tclobj} Index: generic/gentclAPI.tcl =================================================================== diff -u -raef09781efb62a6336ecf355e927549d72b37a7a -rf316e4ef5e27eedc5ed7cb1a4d90ff0d86b53ca8 --- generic/gentclAPI.tcl (.../gentclAPI.tcl) (revision aef09781efb62a6336ecf355e927549d72b37a7a) +++ generic/gentclAPI.tcl (.../gentclAPI.tcl) (revision f316e4ef5e27eedc5ed7cb1a4d90ff0d86b53ca8) @@ -22,12 +22,15 @@ } set domain [split $type |] set opts "static CONST char *opts\[\] = {\"[join $domain {", "}]\", NULL};" - set enums [list] + set enums [list ${argname}NULL] foreach d $domain {lappend enums $argname[string totitle [string map [list - _] $d]]Idx} subst { static int convertTo${name}(Tcl_Interp *interp, Tcl_Obj *objPtr, XOTclParam CONST *pPtr, ClientData *clientData) { + int index, result; $opts - return Tcl_GetIndexFromObj(interp, objPtr, opts, "$argname", 0, (int *)clientData); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "$argname", 0, &index); + *clientData = (ClientData) index + 1; + return result; } enum ${argname}Idx {[join $enums {, }]}; } Index: generic/tclAPI.h =================================================================== diff -u -r558ed9bfabea39f0688b9abe854f6eb7db9f0167 -rf316e4ef5e27eedc5ed7cb1a4d90ff0d86b53ca8 --- generic/tclAPI.h (.../tclAPI.h) (revision 558ed9bfabea39f0688b9abe854f6eb7db9f0167) +++ generic/tclAPI.h (.../tclAPI.h) (revision f316e4ef5e27eedc5ed7cb1a4d90ff0d86b53ca8) @@ -1,27 +1,48 @@ static int convertToConfigureoption(Tcl_Interp *interp, Tcl_Obj *objPtr, XOTclParam CONST *pPtr, ClientData *clientData) { + int index, result; static CONST char *opts[] = {"filter", "softrecreate", "cacheinterface", NULL}; - return Tcl_GetIndexFromObj(interp, objPtr, opts, "configureoption", 0, (int *)clientData); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "configureoption", 0, &index); + *clientData = (ClientData) index + 1; + return result; } -enum configureoptionIdx {configureoptionFilterIdx, configureoptionSoftrecreateIdx, configureoptionCacheinterfaceIdx}; +enum configureoptionIdx {configureoptionNULL, configureoptionFilterIdx, configureoptionSoftrecreateIdx, configureoptionCacheinterfaceIdx}; +static int convertToSelfoption(Tcl_Interp *interp, Tcl_Obj *objPtr, XOTclParam CONST *pPtr, ClientData *clientData) { + int index, result; + static CONST char *opts[] = {"proc", "class", "activelevel", "args", "activemixin", "calledproc", "calledmethod", "calledclass", "callingproc", "callingclass", "callinglevel", "callingobject", "filterreg", "isnextcall", "next", NULL}; + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "selfoption", 0, &index); + *clientData = (ClientData) index + 1; + return result; +} +enum selfoptionIdx {selfoptionNULL, selfoptionProcIdx, selfoptionClassIdx, selfoptionActivelevelIdx, selfoptionArgsIdx, selfoptionActivemixinIdx, selfoptionCalledprocIdx, selfoptionCalledmethodIdx, selfoptionCalledclassIdx, selfoptionCallingprocIdx, selfoptionCallingclassIdx, selfoptionCallinglevelIdx, selfoptionCallingobjectIdx, selfoptionFilterregIdx, selfoptionIsnextcallIdx, selfoptionNextIdx}; + static int convertToObjectkind(Tcl_Interp *interp, Tcl_Obj *objPtr, XOTclParam CONST *pPtr, ClientData *clientData) { + int index, result; static CONST char *opts[] = {"type", "object", "class", "metaclass", "mixin", NULL}; - return Tcl_GetIndexFromObj(interp, objPtr, opts, "objectkind", 0, (int *)clientData); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "objectkind", 0, &index); + *clientData = (ClientData) index + 1; + return result; } -enum objectkindIdx {objectkindTypeIdx, objectkindObjectIdx, objectkindClassIdx, objectkindMetaclassIdx, objectkindMixinIdx}; +enum objectkindIdx {objectkindNULL, objectkindTypeIdx, objectkindObjectIdx, objectkindClassIdx, objectkindMetaclassIdx, objectkindMixinIdx}; static int convertToMethodproperty(Tcl_Interp *interp, Tcl_Obj *objPtr, XOTclParam CONST *pPtr, ClientData *clientData) { + int index, result; static CONST char *opts[] = {"protected", "static", "slotobj", NULL}; - return Tcl_GetIndexFromObj(interp, objPtr, opts, "methodproperty", 0, (int *)clientData); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "methodproperty", 0, &index); + *clientData = (ClientData) index + 1; + return result; } -enum methodpropertyIdx {methodpropertyProtectedIdx, methodpropertyStaticIdx, methodpropertySlotobjIdx}; +enum methodpropertyIdx {methodpropertyNULL, methodpropertyProtectedIdx, methodpropertyStaticIdx, methodpropertySlotobjIdx}; static int convertToRelationtype(Tcl_Interp *interp, Tcl_Obj *objPtr, XOTclParam CONST *pPtr, ClientData *clientData) { + int index, result; static CONST char *opts[] = {"mixin", "instmixin", "object-mixin", "class-mixin", "filter", "instfilter", "object-filter", "class-filter", "class", "superclass", "rootclass", NULL}; - return Tcl_GetIndexFromObj(interp, objPtr, opts, "relationtype", 0, (int *)clientData); + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "relationtype", 0, &index); + *clientData = (ClientData) index + 1; + return result; } -enum relationtypeIdx {relationtypeMixinIdx, relationtypeInstmixinIdx, relationtypeObject_mixinIdx, relationtypeClass_mixinIdx, relationtypeFilterIdx, relationtypeInstfilterIdx, relationtypeObject_filterIdx, relationtypeClass_filterIdx, relationtypeClassIdx, relationtypeSuperclassIdx, relationtypeRootclassIdx}; +enum relationtypeIdx {relationtypeNULL, relationtypeMixinIdx, relationtypeInstmixinIdx, relationtypeObject_mixinIdx, relationtypeClass_mixinIdx, relationtypeFilterIdx, relationtypeInstfilterIdx, relationtypeObject_filterIdx, relationtypeClass_filterIdx, relationtypeClassIdx, relationtypeSuperclassIdx, relationtypeRootclassIdx}; typedef struct { @@ -135,6 +156,7 @@ static int XOTclDispatchCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclDotCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclFinalizeObjCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); +static int XOTclGetSelfObjCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclInstvarCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclInterpObjCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclIsCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); @@ -233,6 +255,7 @@ static int XOTclDispatchCmd(Tcl_Interp *interp, XOTclObject *object, int withObjscope, Tcl_Obj *command, int nobjc, Tcl_Obj *CONST nobjv[]); static int XOTclDotCmd(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); static int XOTclFinalizeObjCmd(Tcl_Interp *interp); +static int XOTclGetSelfObjCmd(Tcl_Interp *interp, int selfoption); static int XOTclInstvarCmd(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); static int XOTclInterpObjCmd(Tcl_Interp *interp, char *name, int objc, Tcl_Obj *CONST objv[]); static int XOTclIsCmd(Tcl_Interp *interp, Tcl_Obj *object, int objectkind, Tcl_Obj *value); @@ -332,6 +355,7 @@ XOTclDispatchCmdIdx, XOTclDotCmdIdx, XOTclFinalizeObjCmdIdx, + XOTclGetSelfObjCmdIdx, XOTclInstvarCmdIdx, XOTclInterpObjCmdIdx, XOTclIsCmdIdx, @@ -2069,6 +2093,24 @@ } static int +XOTclGetSelfObjCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { + parseContext pc; + + if (ArgumentParse(interp, objc, objv, NULL, objv[0], + method_definitions[XOTclGetSelfObjCmdIdx].paramDefs, + method_definitions[XOTclGetSelfObjCmdIdx].nrParameters, + &pc) != TCL_OK) { + return TCL_ERROR; + } else { + int selfoption = (int )pc.clientData[0]; + + parseContextRelease(&pc); + return XOTclGetSelfObjCmd(interp, selfoption); + + } +} + +static int XOTclInstvarCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { @@ -2621,6 +2663,9 @@ {"::xotcl::finalize", XOTclFinalizeObjCmdStub, 0, { } }, +{"::xotcl::self", XOTclGetSelfObjCmdStub, 1, { + {"proc|class|activelevel|args|activemixin|calledproc|calledmethod|calledclass|callingproc|callingclass|callinglevel|callingobject|filterreg|isnextcall|next", 0, 0, convertToSelfoption}} +}, {"::xotcl::instvar", XOTclInstvarCmdStub, 1, { {"args", 0, 0, convertToNothing}} }, Index: generic/xotcl.c =================================================================== diff -u -reb2bd44e4ac7f7e859b58d01c5bedd95886daa4a -rf316e4ef5e27eedc5ed7cb1a4d90ff0d86b53ca8 --- generic/xotcl.c (.../xotcl.c) (revision eb2bd44e4ac7f7e859b58d01c5bedd95886daa4a) +++ generic/xotcl.c (.../xotcl.c) (revision f316e4ef5e27eedc5ed7cb1a4d90ff0d86b53ca8) @@ -3658,10 +3658,7 @@ assert(obj->flags & XOTCL_MIXIN_ORDER_VALID); /*MixinComputeDefined(interp, obj);*/ cmdList = seekCurrent(obj->mixinStack->currentCmdPtr, obj->mixinOrder); - -#if defined(ACTIVEMIXIN) RUNTIME_STATE(interp)->cmdPtr = cmdList->cmdPtr; -#endif /* fprintf(stderr, "MixinSearch searching for '%s' %p\n", methodName, cmdList); @@ -6943,171 +6940,6 @@ return resultObj; } -static int -XOTclSelfSubCommand(Tcl_Interp *interp, XOTclObject *obj, Tcl_Obj *option) { - int result = TCL_OK; - int opt; - XOTclCallStackContent *csc = NULL; - - static CONST char *opts[] = { - "proc", "class", - "activelevel", "args", -#if defined(ACTIVEMIXIN) - "activemixin", -#endif - "calledproc", "calledmethod", - "calledclass", "callingproc", - "callingclass", "callinglevel", - "callingobject", "filterreg", - "isnextcall", "next", - NULL - }; - - enum selfOptionIdx { - procIdx, classIdx, - activelevelIdx, argsIdx, -#if defined(ACTIVEMIXIN) - activemixinIdx, -#endif - calledprocIdx, calledmethodIdx, - calledclassIdx, callingprocIdx, - callingclassIdx, callinglevelIdx, - callingobjectIdx, filterregIdx, - isnextcallIdx, nextIdx - }; - - assert(option); - - if (Tcl_GetIndexFromObj(interp, option, opts, "self option", 0, &opt) != TCL_OK) { - return TCL_ERROR; - } - - if (!obj && opt != callinglevelIdx) { - return XOTclVarErrMsg(interp, "self: no current object", (char *) NULL); - } - - switch (opt) { - case procIdx: { /* proc subcommand */ - csc = CallStackGetTopFrame(interp, NULL); - if (csc) { - CONST char *procName = Tcl_GetCommandName(interp, csc->cmdPtr); - Tcl_SetResult(interp, (char *)procName, TCL_VOLATILE); - } else { - return XOTclVarErrMsg(interp, "Can't find proc", (char *) NULL); - } - break; - } - - case classIdx: { /* class subcommand */ - csc = CallStackGetTopFrame(interp, NULL); - Tcl_SetObjResult(interp, csc->cl ? csc->cl->object.cmdName : XOTclGlobalObjects[XOTE_EMPTY]); - break; - } - - case activelevelIdx: { - Tcl_SetObjResult(interp, computeLevelObj(interp, ACTIVE_LEVEL)); - break; - } - - case argsIdx: { - int nobjc; - Tcl_Obj **nobjv; - Tcl_CallFrame *topFramePtr; - - CallStackGetTopFrame(interp, &topFramePtr); - nobjc = Tcl_CallFrame_objc(topFramePtr); - nobjv = (Tcl_Obj **)Tcl_CallFrame_objv(topFramePtr); - Tcl_SetObjResult(interp, Tcl_NewListObj(nobjc-1, nobjv+1)); - break; - } - -#if defined(ACTIVEMIXIN) - case activemixinIdx: { - XOTclObject *o = NULL; - if (RUNTIME_STATE(interp)->cmdPtr) { - o = XOTclGetObjectFromCmdPtr(RUNTIME_STATE(interp)->cmdPtr); - } - Tcl_SetObjResult(interp, o ? o->cmdName : XOTclGlobalObjects[XOTE_EMPTY]); - break; - } -#endif - case calledprocIdx: - case calledmethodIdx: { - csc = CallStackFindActiveFilter(interp); - if (csc) { - Tcl_SetObjResult(interp, csc->filterStackEntry->calledProc); - } else { - result = XOTclVarErrMsg(interp, "self ", ObjStr(option), - " called from outside of a filter", - (char *) NULL); - } - break; - } - - case calledclassIdx: - Tcl_SetResult(interp, className(FindCalledClass(interp, obj)), TCL_VOLATILE); - break; - - case callingprocIdx: - csc = XOTclCallStackFindLastInvocation(interp, 1, NULL); - Tcl_SetResult(interp, csc ? (char *)Tcl_GetCommandName(interp, csc->cmdPtr) : "", - TCL_VOLATILE); - break; - - case callingclassIdx: - csc = XOTclCallStackFindLastInvocation(interp, 1, NULL); - Tcl_SetObjResult(interp, csc && csc->cl ? csc->cl->object.cmdName : - XOTclGlobalObjects[XOTE_EMPTY]); - break; - - case callinglevelIdx: - if (!obj) { - Tcl_SetIntObj(Tcl_GetObjResult(interp), 1); - } else { - Tcl_SetObjResult(interp, computeLevelObj(interp, CALLING_LEVEL)); - } - break; - - case callingobjectIdx: - csc = XOTclCallStackFindLastInvocation(interp, 1, NULL); - Tcl_SetObjResult(interp, csc ? csc->self->cmdName : XOTclGlobalObjects[XOTE_EMPTY]); - break; - - case filterregIdx: - csc = CallStackFindActiveFilter(interp); - if (csc) { - Tcl_SetObjResult(interp, FilterFindReg(interp, obj, csc->cmdPtr)); - } else { - result = XOTclVarErrMsg(interp, - "self filterreg called from outside of a filter", - (char *) NULL); - } - break; - - case isnextcallIdx: { - Tcl_CallFrame *framePtr; - csc = CallStackGetTopFrame(interp, &framePtr); -#if defined(TCL85STACK) - framePtr = nextFrameOfType(Tcl_CallFrame_callerPtr(framePtr), FRAME_IS_XOTCL_METHOD|FRAME_IS_XOTCL_CMETHOD); - csc = framePtr ? Tcl_CallFrame_clientData(framePtr) : NULL; -#else - csc--; - if (csc <= RUNTIME_STATE(interp)->cs.content) - csc = NULL; -#endif - Tcl_SetBooleanObj(Tcl_GetObjResult(interp), - (csc && (csc->callType & XOTCL_CSC_CALL_IS_NEXT))); - break; - } - - case nextIdx: - result = FindSelfNext(interp, obj); - break; - } - - return result; -} - /* int XOTclKObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { @@ -7119,33 +6951,6 @@ } */ - -int -XOTclGetSelfObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - XOTclObject *obj; - int result; - - if (objc > 2) - return XOTclVarErrMsg(interp, "wrong # of args for self", (char *) NULL); - - obj = GetSelfObj(interp); - /*fprintf(stderr, "getSelfObj returns %p\n", obj); tcl85showStack(interp);*/ - - if (objc == 1) { - if (obj) { - Tcl_SetIntObj(Tcl_GetObjResult(interp), 1); - result = TCL_OK; - } else { - return XOTclVarErrMsg(interp, "self: no current object", (char *) NULL); - } - Tcl_SetObjResult(interp, obj->cmdName); - } else { - return XOTclSelfSubCommand(interp, obj, objv[1]); - } - return result; -} - - /* * object creation & destruction */ @@ -8555,6 +8360,9 @@ *out = tcd->obj->cmdName; } else if (c == 'p' && !strcmp(element, "proc")) { char *methodName = ObjStr(objv[0]); + /* if we dispatch a method via ".", we do not want to see the + "." in the %proc, e.g. for the interceptor slots (such as + .mixin, ... */ if (*methodName == '.') { *out = Tcl_NewStringObj(methodName + 1, -1); } else { @@ -10105,6 +9913,8 @@ Tcl_Command cmd = NULL; char allocation; + fprintf(stderr, "##### methodproperty = %d\n",methodproperty); + /* TODO: introspection for method properties */ if (XOTclObjectIsClass(object)) { @@ -10760,7 +10570,147 @@ } return TCL_OK; } +static int XOTclGetSelfObjCmd(Tcl_Interp *interp, int selfoption) { + XOTclObject *obj = GetSelfObj(interp); + XOTclCallStackContent *csc; + int result = TCL_OK; + /*fprintf(stderr, "getSelfObj returns %p\n", obj); tcl85showStack(interp);*/ + + if (selfoption == 0) { + if (obj) { + Tcl_SetObjResult(interp, obj->cmdName); + return TCL_OK; + } else { + return XOTclVarErrMsg(interp, "self: no current object", (char *) NULL); + } + } + + if (!obj && selfoption != selfoptionCallinglevelIdx) { + return XOTclVarErrMsg(interp, "self: no current object", (char *) NULL); + } + + switch (selfoption) { + case selfoptionProcIdx: { /* proc subcommand */ + csc = CallStackGetTopFrame(interp, NULL); + if (csc) { + CONST char *procName = Tcl_GetCommandName(interp, csc->cmdPtr); + Tcl_SetResult(interp, (char *)procName, TCL_VOLATILE); + } else { + return XOTclVarErrMsg(interp, "Can't find proc", (char *) NULL); + } + break; + } + + case selfoptionClassIdx: { /* class subcommand */ + csc = CallStackGetTopFrame(interp, NULL); + Tcl_SetObjResult(interp, csc->cl ? csc->cl->object.cmdName : XOTclGlobalObjects[XOTE_EMPTY]); + break; + } + + case selfoptionActivelevelIdx: { + Tcl_SetObjResult(interp, computeLevelObj(interp, ACTIVE_LEVEL)); + break; + } + + case selfoptionArgsIdx: { + int nobjc; + Tcl_Obj **nobjv; + Tcl_CallFrame *topFramePtr; + + CallStackGetTopFrame(interp, &topFramePtr); + nobjc = Tcl_CallFrame_objc(topFramePtr); + nobjv = (Tcl_Obj **)Tcl_CallFrame_objv(topFramePtr); + Tcl_SetObjResult(interp, Tcl_NewListObj(nobjc-1, nobjv+1)); + break; + } + + case selfoptionActivemixinIdx: { + XOTclObject *o = NULL; + if (RUNTIME_STATE(interp)->cmdPtr) { + o = XOTclGetObjectFromCmdPtr(RUNTIME_STATE(interp)->cmdPtr); + } + Tcl_SetObjResult(interp, o ? o->cmdName : XOTclGlobalObjects[XOTE_EMPTY]); + break; + } + + case selfoptionCalledprocIdx: + case selfoptionCalledmethodIdx: { + csc = CallStackFindActiveFilter(interp); + if (csc) { + Tcl_SetObjResult(interp, csc->filterStackEntry->calledProc); + } else { + result = XOTclVarErrMsg(interp, "called from outside of a filter", + (char *) NULL); + } + break; + } + + case selfoptionCalledclassIdx: + Tcl_SetResult(interp, className(FindCalledClass(interp, obj)), TCL_VOLATILE); + break; + + case selfoptionCallingprocIdx: + csc = XOTclCallStackFindLastInvocation(interp, 1, NULL); + Tcl_SetResult(interp, csc ? (char *)Tcl_GetCommandName(interp, csc->cmdPtr) : "", + TCL_VOLATILE); + break; + + case selfoptionCallingclassIdx: + csc = XOTclCallStackFindLastInvocation(interp, 1, NULL); + Tcl_SetObjResult(interp, csc && csc->cl ? csc->cl->object.cmdName : + XOTclGlobalObjects[XOTE_EMPTY]); + break; + + case selfoptionCallinglevelIdx: + if (!obj) { + Tcl_SetIntObj(Tcl_GetObjResult(interp), 1); + } else { + Tcl_SetObjResult(interp, computeLevelObj(interp, CALLING_LEVEL)); + } + break; + + case selfoptionCallingobjectIdx: + csc = XOTclCallStackFindLastInvocation(interp, 1, NULL); + Tcl_SetObjResult(interp, csc ? csc->self->cmdName : XOTclGlobalObjects[XOTE_EMPTY]); + break; + + case selfoptionFilterregIdx: + csc = CallStackFindActiveFilter(interp); + if (csc) { + Tcl_SetObjResult(interp, FilterFindReg(interp, obj, csc->cmdPtr)); + } else { + result = XOTclVarErrMsg(interp, + "self filterreg called from outside of a filter", + (char *) NULL); + } + break; + + case selfoptionIsnextcallIdx: { + Tcl_CallFrame *framePtr; + csc = CallStackGetTopFrame(interp, &framePtr); +#if defined(TCL85STACK) + framePtr = nextFrameOfType(Tcl_CallFrame_callerPtr(framePtr), FRAME_IS_XOTCL_METHOD|FRAME_IS_XOTCL_CMETHOD); + csc = framePtr ? Tcl_CallFrame_clientData(framePtr) : NULL; +#else + csc--; + if (csc <= RUNTIME_STATE(interp)->cs.content) + csc = NULL; +#endif + Tcl_SetBooleanObj(Tcl_GetObjResult(interp), + (csc && (csc->callType & XOTCL_CSC_CALL_IS_NEXT))); + break; + } + + case selfoptionNextIdx: + result = FindSelfNext(interp, obj); + break; + } + + return result; +} + + static int XOTclSetInstvarCmd(Tcl_Interp *interp, XOTclObject *object, Tcl_Obj *variable, Tcl_Obj *value) { return setInstVar(interp, object , variable, value); } @@ -12939,7 +12889,6 @@ #ifdef XOTCL_BYTECODE instructions[INST_SELF].cmdPtr = (Command *) #endif - Tcl_CreateObjCommand(interp, "::xotcl::self", XOTclGetSelfObjCmd, 0, 0); /*Tcl_CreateObjCommand(interp, "::xotcl::K", XOTclKObjCmd, 0, 0);*/ #if defined(PRE85) Index: generic/xotclInt.h =================================================================== diff -u -r558ed9bfabea39f0688b9abe854f6eb7db9f0167 -rf316e4ef5e27eedc5ed7cb1a4d90ff0d86b53ca8 --- generic/xotclInt.h (.../xotclInt.h) (revision 558ed9bfabea39f0688b9abe854f6eb7db9f0167) +++ generic/xotclInt.h (.../xotclInt.h) (revision f316e4ef5e27eedc5ed7cb1a4d90ff0d86b53ca8) @@ -659,7 +659,7 @@ Tcl_Namespace *fakeNS; XotclStubs *xotclStubs; Tcl_CallFrame *varFramePtr; - Command *cmdPtr; /* used for ACTIVE_MIXIN */ + Tcl_Command cmdPtr; /* used for ACTIVE_MIXIN */ Tcl_Command dotCmd; #if defined(PROFILE) XOTclProfile profile;