From b888cd3011dbbc4984d32475243bb501947969f2 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 21 Jun 2010 12:14:07 +0000 Subject: [Patch #2999889] TkCopyAndGlobalEval obsolete --- ChangeLog | 7 +++++++ generic/tkBind.c | 39 +-------------------------------------- generic/tkInt.decls | 6 ++---- generic/tkIntDecls.h | 16 ++++------------ generic/tkStubInit.c | 13 ++----------- 5 files changed, 16 insertions(+), 65 deletions(-) diff --git a/ChangeLog b/ChangeLog index d28853a..e18bfc6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-06-21 Jan Nijtmans + + * generic/tkInt.decls [Patch #2999889] TkCopyAndGlobalEval obsolete + * generic/tkIntDecls.h + * generic/tkBind.c + * generic/tkStubInit.c + 2010-06-19 Joe English * win/tkWinScrlbr.c, carbon/tkMacOSXScrlbr.c: Replace binding diff --git a/generic/tkBind.c b/generic/tkBind.c index bf21e59..8f40900 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkBind.c,v 1.67 2010/06/19 16:18:41 jenglish Exp $ + * RCS: @(#) $Id: tkBind.c,v 1.68 2010/06/21 12:14:08 nijtmans Exp $ */ #include "tkInt.h" @@ -4239,43 +4239,6 @@ TkKeysymToString( /* *---------------------------------------------------------------------- * - * TkCopyAndGlobalEval -- - * - * This function makes a copy of a script then calls Tcl_GlobalEval to - * evaluate it. It's used in situations where the execution of a command - * may cause the original command string to be reallocated. - * - * OBSOLETE! NOT USED ANYWHERE IN TK! ONLY FOR STUB TABLE! - * - * Results: - * Returns the result of evaluating script, including both a standard Tcl - * completion code and a string in the interp's result. - * - * Side effects: - * Any; depends on script. - * - *---------------------------------------------------------------------- - */ - -int -TkCopyAndGlobalEval( - Tcl_Interp *interp, /* Interpreter in which to evaluate script. */ - const char *script) /* Script to evaluate. */ -{ - Tcl_DString buffer; - int code; - - Tcl_DStringInit(&buffer); - Tcl_DStringAppend(&buffer, script, -1); - code = Tcl_EvalEx(interp, Tcl_DStringValue(&buffer), - Tcl_DStringLength(&buffer), TCL_EVAL_GLOBAL); - Tcl_DStringFree(&buffer); - return code; -} - -/* - *---------------------------------------------------------------------- - * * TkpGetBindingXEvent -- * * This function returns the XEvent associated with the currently diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 6dd4d35..2bf8831 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tkInt.decls,v 1.62 2010/06/19 16:18:41 jenglish Exp $ +# RCS: @(#) $Id: tkInt.decls,v 1.63 2010/06/21 12:14:08 nijtmans Exp $ library tk @@ -58,10 +58,8 @@ declare 9 generic { void TkComputeAnchor(Tk_Anchor anchor, Tk_Window tkwin, int padX, int padY, int innerWidth, int innerHeight, int *xPtr, int *yPtr) } -declare 10 generic { - int TkCopyAndGlobalEval(Tcl_Interp *interp, const char *script) -} # +# Slot 10 unused (WAS: TkCopyAndGlobalEval) # Slot 11 unused (WAS: TkCreateBindingProcedure) # declare 12 generic { diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h index a486843..4607f06 100644 --- a/generic/tkIntDecls.h +++ b/generic/tkIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkIntDecls.h,v 1.51 2010/06/19 16:18:41 jenglish Exp $ + * RCS: @(#) $Id: tkIntDecls.h,v 1.52 2010/06/21 12:14:07 nijtmans Exp $ */ #ifndef _TKINTDECLS @@ -94,12 +94,7 @@ EXTERN void TkComputeAnchor(Tk_Anchor anchor, Tk_Window tkwin, int padX, int padY, int innerWidth, int innerHeight, int *xPtr, int *yPtr); #endif -#ifndef TkCopyAndGlobalEval_TCL_DECLARED -#define TkCopyAndGlobalEval_TCL_DECLARED -/* 10 */ -EXTERN int TkCopyAndGlobalEval(Tcl_Interp *interp, - const char *script); -#endif +/* Slot 10 is reserved */ /* Slot 11 is reserved */ #ifndef TkCreateCursorFromData_TCL_DECLARED #define TkCreateCursorFromData_TCL_DECLARED @@ -1114,7 +1109,7 @@ typedef struct TkIntStubs { void (*tkChangeEventWindow) (XEvent *eventPtr, TkWindow *winPtr); /* 7 */ int (*tkClipInit) (Tcl_Interp *interp, TkDisplay *dispPtr); /* 8 */ void (*tkComputeAnchor) (Tk_Anchor anchor, Tk_Window tkwin, int padX, int padY, int innerWidth, int innerHeight, int *xPtr, int *yPtr); /* 9 */ - int (*tkCopyAndGlobalEval) (Tcl_Interp *interp, const char *script); /* 10 */ + void *reserved10; void *reserved11; TkCursor * (*tkCreateCursorFromData) (Tk_Window tkwin, const char *source, const char *mask, int width, int height, int xHot, int yHot, XColor fg, XColor bg); /* 12 */ int (*tkCreateFrame) (ClientData clientData, Tcl_Interp *interp, int argc, const char *const *argv, int toplevel, const char *appName); /* 13 */ @@ -1433,10 +1428,7 @@ extern const TkIntStubs *tkIntStubsPtr; #define TkComputeAnchor \ (tkIntStubsPtr->tkComputeAnchor) /* 9 */ #endif -#ifndef TkCopyAndGlobalEval -#define TkCopyAndGlobalEval \ - (tkIntStubsPtr->tkCopyAndGlobalEval) /* 10 */ -#endif +/* Slot 10 is reserved */ /* Slot 11 is reserved */ #ifndef TkCreateCursorFromData #define TkCreateCursorFromData \ diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index af5beed..d9b8c95 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkStubInit.c,v 1.74 2010/06/19 16:18:41 jenglish Exp $ + * RCS: @(#) $Id: tkStubInit.c,v 1.75 2010/06/21 12:14:08 nijtmans Exp $ */ #include "tkInt.h" @@ -33,15 +33,6 @@ #include "tkIntXlibDecls.h" /* - * Remove macros that will interfere with the definitions below. - */ - -#define Tk_CreateCanvasVisitor \ - ((void (*)(Tcl_Interp * interp, void * typePtr)) NULL) -#define Tk_GetCanvasVisitor \ - ((void * (*)(Tcl_Interp * interp, const char * name)) NULL) - -/* * WARNING: The contents of this file is automatically generated by the * tools/genStubs.tcl script. Any modifications to the function declarations * below should be made in the generic/tk.decls script. @@ -64,7 +55,7 @@ static const TkIntStubs tkIntStubs = { TkChangeEventWindow, /* 7 */ TkClipInit, /* 8 */ TkComputeAnchor, /* 9 */ - TkCopyAndGlobalEval, /* 10 */ + NULL, /* 10 */ NULL, /* 11 */ TkCreateCursorFromData, /* 12 */ TkCreateFrame, /* 13 */ -- cgit v0.12