Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Allow Tcl to be compiled even if Tcl_Eval, Tcl_GetVar, ... are macros. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
03b46ac836729ae7fa1112d6f609d6b8 |
User & Date: | jan.nijtmans 2013-02-28 08:29:35 |
Context
2013-02-28
| ||
14:19 | fix coroutine-4.6 so that it runs in isolation, [Bug 3606395] check-in: 2c8c39bdf1 user: mig tags: trunk | |
13:03 | merge trunk check-in: b357321c05 user: mig tags: mig-no280 | |
08:47 | Use more macro's in stead of thin wrapper functions. check-in: 3b51901dfc user: jan.nijtmans tags: more-macros | |
08:29 | Allow Tcl to be compiled even if Tcl_Eval, Tcl_GetVar, ... are macros. check-in: 03b46ac836 user: jan.nijtmans tags: trunk | |
2013-02-27
| ||
17:48 | minor: formatting tweaks in the change log check-in: 95baa65e2e user: dkf tags: trunk | |
Changes
Changes to generic/tclBasic.c.
︙ | ︙ | |||
5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 | * * Side effects: * Can be almost arbitrary, depending on the commands in the script. * *---------------------------------------------------------------------- */ int Tcl_Eval( Tcl_Interp *interp, /* Token for command interpreter (returned by * previous call to Tcl_CreateInterp). */ const char *script) /* Pointer to TCL command to execute. */ { int code = Tcl_EvalEx(interp, script, -1, 0); | > | 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 | * * Side effects: * Can be almost arbitrary, depending on the commands in the script. * *---------------------------------------------------------------------- */ #undef Tcl_Eval int Tcl_Eval( Tcl_Interp *interp, /* Token for command interpreter (returned by * previous call to Tcl_CreateInterp). */ const char *script) /* Pointer to TCL command to execute. */ { int code = Tcl_EvalEx(interp, script, -1, 0); |
︙ | ︙ | |||
6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 | * The contents of message are appended to the errorInfo field. If we are * just starting to log an error, errorInfo is initialized from the error * message in the interpreter's result. * *---------------------------------------------------------------------- */ void Tcl_AddErrorInfo( Tcl_Interp *interp, /* Interpreter to which error information * pertains. */ const char *message) /* Message to record. */ { Tcl_AddObjErrorInfo(interp, message, -1); | > | 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 | * The contents of message are appended to the errorInfo field. If we are * just starting to log an error, errorInfo is initialized from the error * message in the interpreter's result. * *---------------------------------------------------------------------- */ #undef Tcl_AddErrorInfo void Tcl_AddErrorInfo( Tcl_Interp *interp, /* Interpreter to which error information * pertains. */ const char *message) /* Message to record. */ { Tcl_AddObjErrorInfo(interp, message, -1); |
︙ | ︙ | |||
6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 | * "length" is negative, use bytes up to the first NULL byte. If we are * just starting to log an error, errorInfo is initialized from the error * message in the interpreter's result. * *---------------------------------------------------------------------- */ void Tcl_AddObjErrorInfo( Tcl_Interp *interp, /* Interpreter to which error information * pertains. */ const char *message, /* Points to the first byte of an array of * bytes of the message. */ int length) /* The number of bytes in the message. If < 0, | > | 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 | * "length" is negative, use bytes up to the first NULL byte. If we are * just starting to log an error, errorInfo is initialized from the error * message in the interpreter's result. * *---------------------------------------------------------------------- */ #undef Tcl_AddObjErrorInfo void Tcl_AddObjErrorInfo( Tcl_Interp *interp, /* Interpreter to which error information * pertains. */ const char *message, /* Points to the first byte of an array of * bytes of the message. */ int length) /* The number of bytes in the message. If < 0, |
︙ | ︙ | |||
6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 | * The command string is executed in interp, and the execution is carried * out in the variable context of global level (no functions active), * just as if an "uplevel #0" command were being executed. * *---------------------------------------------------------------------- */ int Tcl_GlobalEval( Tcl_Interp *interp, /* Interpreter in which to evaluate * command. */ const char *command) /* Command to evaluate. */ { register Interp *iPtr = (Interp *) interp; | > | 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 | * The command string is executed in interp, and the execution is carried * out in the variable context of global level (no functions active), * just as if an "uplevel #0" command were being executed. * *---------------------------------------------------------------------- */ #undef Tcl_GlobalEval int Tcl_GlobalEval( Tcl_Interp *interp, /* Interpreter in which to evaluate * command. */ const char *command) /* Command to evaluate. */ { register Interp *iPtr = (Interp *) interp; |
︙ | ︙ |
Changes to generic/tclIndexObj.c.
︙ | ︙ | |||
97 98 99 100 101 102 103 104 105 106 107 108 109 110 | * Side effects: * The result of the lookup is cached as the internal rep of objPtr, so * that repeated lookups can be done quickly. * *---------------------------------------------------------------------- */ int Tcl_GetIndexFromObj( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ Tcl_Obj *objPtr, /* Object containing the string to lookup. */ const char *const*tablePtr, /* Array of strings to compare against the * value of objPtr; last entry must be NULL * and there must not be duplicate entries. */ | > | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | * Side effects: * The result of the lookup is cached as the internal rep of objPtr, so * that repeated lookups can be done quickly. * *---------------------------------------------------------------------- */ #undef Tcl_GetIndexFromObj int Tcl_GetIndexFromObj( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ Tcl_Obj *objPtr, /* Object containing the string to lookup. */ const char *const*tablePtr, /* Array of strings to compare against the * value of objPtr; last entry must be NULL * and there must not be duplicate entries. */ |
︙ | ︙ |
Changes to generic/tclObj.c.
︙ | ︙ | |||
1729 1730 1731 1732 1733 1734 1735 | * * Side effects: * None. * *---------------------------------------------------------------------- */ | < > | 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 | * * Side effects: * None. * *---------------------------------------------------------------------- */ #undef Tcl_NewBooleanObj #ifdef TCL_MEM_DEBUG Tcl_Obj * Tcl_NewBooleanObj( register int boolValue) /* Boolean used to initialize new object. */ { return Tcl_DbNewBooleanObj(boolValue, "unknown", 0); } |
︙ | ︙ | |||
1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 | * * Side effects: * None. * *---------------------------------------------------------------------- */ #ifdef TCL_MEM_DEBUG Tcl_Obj * Tcl_DbNewBooleanObj( register int boolValue, /* Boolean used to initialize new object. */ const char *file, /* The name of the source file calling this * function; used for debugging. */ | > | 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 | * * Side effects: * None. * *---------------------------------------------------------------------- */ #undef Tcl_DbNewBooleanObj #ifdef TCL_MEM_DEBUG Tcl_Obj * Tcl_DbNewBooleanObj( register int boolValue, /* Boolean used to initialize new object. */ const char *file, /* The name of the source file calling this * function; used for debugging. */ |
︙ | ︙ | |||
1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 | * Side effects: * The object's old string rep, if any, is freed. Also, any old internal * rep is freed. * *---------------------------------------------------------------------- */ void Tcl_SetBooleanObj( register Tcl_Obj *objPtr, /* Object whose internal rep to init. */ register int boolValue) /* Boolean used to set object's value. */ { if (Tcl_IsShared(objPtr)) { Tcl_Panic("%s called with shared object", "Tcl_SetBooleanObj"); | > | 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 | * Side effects: * The object's old string rep, if any, is freed. Also, any old internal * rep is freed. * *---------------------------------------------------------------------- */ #undef Tcl_SetBooleanObj void Tcl_SetBooleanObj( register Tcl_Obj *objPtr, /* Object whose internal rep to init. */ register int boolValue) /* Boolean used to set object's value. */ { if (Tcl_IsShared(objPtr)) { Tcl_Panic("%s called with shared object", "Tcl_SetBooleanObj"); |
︙ | ︙ | |||
2389 2390 2391 2392 2393 2394 2395 | * * Side effects: * None. * *---------------------------------------------------------------------- */ | < > | 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 | * * Side effects: * None. * *---------------------------------------------------------------------- */ #undef Tcl_NewIntObj #ifdef TCL_MEM_DEBUG Tcl_Obj * Tcl_NewIntObj( register int intValue) /* Int used to initialize the new object. */ { return Tcl_DbNewLongObj((long)intValue, "unknown", 0); } |
︙ | ︙ | |||
2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 | * Side effects: * The object's old string rep, if any, is freed. Also, any old internal * rep is freed. * *---------------------------------------------------------------------- */ void Tcl_SetIntObj( register Tcl_Obj *objPtr, /* Object whose internal rep to init. */ register int intValue) /* Integer used to set object's value. */ { if (Tcl_IsShared(objPtr)) { Tcl_Panic("%s called with shared object", "Tcl_SetIntObj"); | > | 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 | * Side effects: * The object's old string rep, if any, is freed. Also, any old internal * rep is freed. * *---------------------------------------------------------------------- */ #undef Tcl_SetIntObj void Tcl_SetIntObj( register Tcl_Obj *objPtr, /* Object whose internal rep to init. */ register int intValue) /* Integer used to set object's value. */ { if (Tcl_IsShared(objPtr)) { Tcl_Panic("%s called with shared object", "Tcl_SetIntObj"); |
︙ | ︙ |
Changes to generic/tclPkg.c.
︙ | ︙ | |||
102 103 104 105 106 107 108 109 110 111 112 113 114 115 | * Side effects: * The interpreter remembers that this package is available, so that no * other version of the package may be provided for the interpreter. * *---------------------------------------------------------------------- */ int Tcl_PkgProvide( Tcl_Interp *interp, /* Interpreter in which package is now * available. */ const char *name, /* Name of package. */ const char *version) /* Version string for package. */ { | > | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | * Side effects: * The interpreter remembers that this package is available, so that no * other version of the package may be provided for the interpreter. * *---------------------------------------------------------------------- */ #undef Tcl_PkgProvide int Tcl_PkgProvide( Tcl_Interp *interp, /* Interpreter in which package is now * available. */ const char *name, /* Name of package. */ const char *version) /* Version string for package. */ { |
︙ | ︙ | |||
184 185 186 187 188 189 190 191 192 193 194 195 196 197 | * Side effects: * The script from some previous "package ifneeded" command may be * invoked to provide the package. * *---------------------------------------------------------------------- */ const char * Tcl_PkgRequire( Tcl_Interp *interp, /* Interpreter in which package is now * available. */ const char *name, /* Name of desired package. */ const char *version, /* Version string for desired version; NULL * means use the latest version available. */ | > | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | * Side effects: * The script from some previous "package ifneeded" command may be * invoked to provide the package. * *---------------------------------------------------------------------- */ #undef Tcl_PkgRequire const char * Tcl_PkgRequire( Tcl_Interp *interp, /* Interpreter in which package is now * available. */ const char *name, /* Name of desired package. */ const char *version, /* Version string for desired version; NULL * means use the latest version available. */ |
︙ | ︙ | |||
666 667 668 669 670 671 672 673 674 675 676 677 678 679 | * * Side effects: * None. * *---------------------------------------------------------------------- */ const char * Tcl_PkgPresent( Tcl_Interp *interp, /* Interpreter in which package is now * available. */ const char *name, /* Name of desired package. */ const char *version, /* Version string for desired version; NULL * means use the latest version available. */ | > | 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 | * * Side effects: * None. * *---------------------------------------------------------------------- */ #undef Tcl_PkgPresent const char * Tcl_PkgPresent( Tcl_Interp *interp, /* Interpreter in which package is now * available. */ const char *name, /* Name of desired package. */ const char *version, /* Version string for desired version; NULL * means use the latest version available. */ |
︙ | ︙ |
Changes to generic/tclResult.c.
︙ | ︙ | |||
226 227 228 229 230 231 232 233 234 235 236 237 238 239 | * * Side effects: * Resets the interpreter result. * *---------------------------------------------------------------------- */ void Tcl_SaveResult( Tcl_Interp *interp, /* Interpreter to save. */ Tcl_SavedResult *statePtr) /* Pointer to state structure. */ { Interp *iPtr = (Interp *) interp; | > | 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | * * Side effects: * Resets the interpreter result. * *---------------------------------------------------------------------- */ #undef Tcl_SaveResult void Tcl_SaveResult( Tcl_Interp *interp, /* Interpreter to save. */ Tcl_SavedResult *statePtr) /* Pointer to state structure. */ { Interp *iPtr = (Interp *) interp; |
︙ | ︙ | |||
300 301 302 303 304 305 306 307 308 309 310 311 312 313 | * * Side effects: * Restores the interpreter result. * *---------------------------------------------------------------------- */ void Tcl_RestoreResult( Tcl_Interp *interp, /* Interpreter being restored. */ Tcl_SavedResult *statePtr) /* State returned by Tcl_SaveResult. */ { Interp *iPtr = (Interp *) interp; | > | 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 | * * Side effects: * Restores the interpreter result. * *---------------------------------------------------------------------- */ #undef Tcl_RestoreResult void Tcl_RestoreResult( Tcl_Interp *interp, /* Interpreter being restored. */ Tcl_SavedResult *statePtr) /* State returned by Tcl_SaveResult. */ { Interp *iPtr = (Interp *) interp; |
︙ | ︙ | |||
368 369 370 371 372 373 374 375 376 377 378 379 380 381 | * * Side effects: * None. * *---------------------------------------------------------------------- */ void Tcl_DiscardResult( Tcl_SavedResult *statePtr) /* State returned by Tcl_SaveResult. */ { TclDecrRefCount(statePtr->objResultPtr); if (statePtr->result == statePtr->appendResult) { | > | 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 | * * Side effects: * None. * *---------------------------------------------------------------------- */ #undef Tcl_DiscardResult void Tcl_DiscardResult( Tcl_SavedResult *statePtr) /* State returned by Tcl_SaveResult. */ { TclDecrRefCount(statePtr->objResultPtr); if (statePtr->result == statePtr->appendResult) { |
︙ | ︙ |
Changes to generic/tclStubInit.c.
︙ | ︙ | |||
38 39 40 41 42 43 44 45 46 47 48 49 50 51 | #undef Tcl_FindHashEntry #undef Tcl_CreateHashEntry #undef Tcl_Panic #undef Tcl_FindExecutable #undef TclpGetPid #undef TclSockMinimumBuffers #define TclBackgroundException Tcl_BackgroundException /* See bug 510001: TclSockMinimumBuffers needs plat imp */ #ifdef _WIN64 # define TclSockMinimumBuffersOld 0 #else #define TclSockMinimumBuffersOld sockMinimumBuffersOld static int TclSockMinimumBuffersOld(int sock, int size) | > | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | #undef Tcl_FindHashEntry #undef Tcl_CreateHashEntry #undef Tcl_Panic #undef Tcl_FindExecutable #undef TclpGetPid #undef TclSockMinimumBuffers #define TclBackgroundException Tcl_BackgroundException #undef Tcl_SetIntObj /* See bug 510001: TclSockMinimumBuffers needs plat imp */ #ifdef _WIN64 # define TclSockMinimumBuffersOld 0 #else #define TclSockMinimumBuffersOld sockMinimumBuffersOld static int TclSockMinimumBuffersOld(int sock, int size) |
︙ | ︙ |
Changes to generic/tclTrace.c.
︙ | ︙ | |||
3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 | * references to the variable will be intermediated by proc. See the * manual entry for complete details on the calling sequence for proc. * The variable's flags are updated. * *---------------------------------------------------------------------- */ int Tcl_TraceVar( Tcl_Interp *interp, /* Interpreter in which variable is to be * traced. */ const char *varName, /* Name of variable; may end with "(index)" to * signify an array reference. */ int flags, /* OR-ed collection of bits, including any of | > | 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 | * references to the variable will be intermediated by proc. See the * manual entry for complete details on the calling sequence for proc. * The variable's flags are updated. * *---------------------------------------------------------------------- */ #undef Tcl_TraceVar int Tcl_TraceVar( Tcl_Interp *interp, /* Interpreter in which variable is to be * traced. */ const char *varName, /* Name of variable; may end with "(index)" to * signify an array reference. */ int flags, /* OR-ed collection of bits, including any of |
︙ | ︙ |
Changes to generic/tclVar.c.
︙ | ︙ | |||
1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 | * * Side effects: * None. * *---------------------------------------------------------------------- */ const char * Tcl_GetVar( Tcl_Interp *interp, /* Command interpreter in which varName is to * be looked up. */ const char *varName, /* Name of a variable in interp. */ int flags) /* OR-ed combination of TCL_GLOBAL_ONLY, * TCL_NAMESPACE_ONLY or TCL_LEAVE_ERR_MSG | > | 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 | * * Side effects: * None. * *---------------------------------------------------------------------- */ #undef Tcl_GetVar const char * Tcl_GetVar( Tcl_Interp *interp, /* Command interpreter in which varName is to * be looked up. */ const char *varName, /* Name of a variable in interp. */ int flags) /* OR-ed combination of TCL_GLOBAL_ONLY, * TCL_NAMESPACE_ONLY or TCL_LEAVE_ERR_MSG |
︙ | ︙ | |||
1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 | * If varName is defined as a local or global variable in interp, its * value is changed to newValue. If varName isn't currently defined, then * a new global variable by that name is created. * *---------------------------------------------------------------------- */ const char * Tcl_SetVar( Tcl_Interp *interp, /* Command interpreter in which varName is to * be looked up. */ const char *varName, /* Name of a variable in interp. */ const char *newValue, /* New value for varName. */ int flags) /* Various flags that tell how to set value: | > | 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 | * If varName is defined as a local or global variable in interp, its * value is changed to newValue. If varName isn't currently defined, then * a new global variable by that name is created. * *---------------------------------------------------------------------- */ #undef Tcl_SetVar const char * Tcl_SetVar( Tcl_Interp *interp, /* Command interpreter in which varName is to * be looked up. */ const char *varName, /* Name of a variable in interp. */ const char *newValue, /* New value for varName. */ int flags) /* Various flags that tell how to set value: |
︙ | ︙ | |||
2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 | * Side effects: * If varName is defined as a local or global variable in interp, it is * deleted. * *---------------------------------------------------------------------- */ int Tcl_UnsetVar( Tcl_Interp *interp, /* Command interpreter in which varName is to * be looked up. */ const char *varName, /* Name of a variable in interp. May be either * a scalar name or an array name or an * element in an array. */ | > | 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 | * Side effects: * If varName is defined as a local or global variable in interp, it is * deleted. * *---------------------------------------------------------------------- */ #undef Tcl_UnsetVar int Tcl_UnsetVar( Tcl_Interp *interp, /* Command interpreter in which varName is to * be looked up. */ const char *varName, /* Name of a variable in interp. May be either * a scalar name or an array name or an * element in an array. */ |
︙ | ︙ | |||
4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 | * accessible under the name localNameStr, so that references to * localNameStr are redirected to the other variable like a symbolic * link. * *---------------------------------------------------------------------- */ int Tcl_UpVar( Tcl_Interp *interp, /* Command interpreter in which varName is to * be looked up. */ const char *frameName, /* Name of the frame containing the source * variable, such as "1" or "#0". */ const char *varName, /* Name of a variable in interp to link to. | > | 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 | * accessible under the name localNameStr, so that references to * localNameStr are redirected to the other variable like a symbolic * link. * *---------------------------------------------------------------------- */ #undef Tcl_UpVar int Tcl_UpVar( Tcl_Interp *interp, /* Command interpreter in which varName is to * be looked up. */ const char *frameName, /* Name of the frame containing the source * variable, such as "1" or "#0". */ const char *varName, /* Name of a variable in interp to link to. |
︙ | ︙ |