diff options
Diffstat (limited to 'generic/tclDisassemble.c')
-rw-r--r-- | generic/tclDisassemble.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/generic/tclDisassemble.c b/generic/tclDisassemble.c index a7ab8db..83642f0 100644 --- a/generic/tclDisassemble.c +++ b/generic/tclDisassemble.c @@ -23,8 +23,7 @@ static Tcl_Obj * DisassembleByteCodeAsDicts(Tcl_Interp *interp, Tcl_Obj *objPtr); -static Tcl_Obj * DisassembleByteCodeObj(Tcl_Interp *interp, - Tcl_Obj *objPtr); +static Tcl_Obj * DisassembleByteCodeObj(Tcl_Obj *objPtr); static int FormatInstruction(ByteCode *codePtr, const unsigned char *pc, Tcl_Obj *bufferObj); static void GetLocationInformation(Proc *procPtr, @@ -135,7 +134,7 @@ TclPrintByteCodeObj( Tcl_Interp *interp, /* Used only for getting location info. */ Tcl_Obj *objPtr) /* The bytecode object to disassemble. */ { - Tcl_Obj *bufPtr = DisassembleByteCodeObj(interp, objPtr); + Tcl_Obj *bufPtr = DisassembleByteCodeObj(objPtr); fprintf(stdout, "\n%s", TclGetString(bufPtr)); Tcl_DecrRefCount(bufPtr); @@ -251,7 +250,6 @@ TclPrintSource( static Tcl_Obj * DisassembleByteCodeObj( - Tcl_Interp *interp, Tcl_Obj *objPtr) /* The bytecode object to disassemble. */ { ByteCode *codePtr; @@ -952,8 +950,7 @@ PrintSourceToObj( static Tcl_Obj * DisassembleByteCodeAsDicts( - Tcl_Interp *interp, /* Used for looking up the CmdFrame for the - * procedure, if one exists. */ + Tcl_Interp *dummy, /* Not used. */ Tcl_Obj *objPtr) /* The bytecode-holding value to take apart */ { ByteCode *codePtr; @@ -962,6 +959,7 @@ DisassembleByteCodeAsDicts( unsigned char *pc, *opnd, *codeOffPtr, *codeLenPtr, *srcOffPtr, *srcLenPtr; int codeOffset, codeLength, sourceOffset, sourceLength; int i, val, line; + (void)dummy; ByteCodeGetIntRep(objPtr, &tclByteCodeType, codePtr); @@ -1577,7 +1575,7 @@ Tcl_DisassembleObjCmd( TclGetString(objv[3]), NULL); return TCL_ERROR; } - procPtr = TclOOGetProcFromMethod(Tcl_GetHashValue(hPtr)); + procPtr = TclOOGetProcFromMethod((Method *)Tcl_GetHashValue(hPtr)); if (procPtr == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "body not available for this kind of method", -1)); @@ -1627,7 +1625,7 @@ Tcl_DisassembleObjCmd( DisassembleByteCodeAsDicts(interp, codeObjPtr)); } else { Tcl_SetObjResult(interp, - DisassembleByteCodeObj(interp, codeObjPtr)); + DisassembleByteCodeObj(codeObjPtr)); } return TCL_OK; } |