Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Implement Tcl_Pkg* functions as macro's around Tcl_Pkg*Ex. This saves stack space, is (marginally) faster, while still being fully up/down compatible. It makes pkgb.so loadable in "novem" without the need to change the Tcl_PkgProvide() call to Tcl_PkgProvideEx(). |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | core-8-5-branch |
Files: | files | file ages | folders |
SHA1: |
7314d4f7dcb71b3cc61be4ba6cc2b0bf |
User & Date: | jan.nijtmans 2013-04-12 11:22:43 |
Context
2013-04-16
| ||
20:18 | 3610404 When we let go of commandPtr in TclEvalObjvInternal, NULL out the variable so we don't mista... check-in: 6c9f37059e user: dgp tags: core-8-5-branch | |
2013-04-12
| ||
11:27 | Implement Tcl_Pkg* functions as macro's around Tcl_Pkg*Ex. This saves stack space, is (marginally) f... check-in: 0d1aa1bcb8 user: jan.nijtmans tags: trunk | |
11:22 | Implement Tcl_Pkg* functions as macro's around Tcl_Pkg*Ex. This saves stack space, is (marginally) f... check-in: 7314d4f7dc user: jan.nijtmans tags: core-8-5-branch | |
11:08 | Implement Tcl_Pkg* functions as macro's around Tcl_Pkg*Ex. This saves stack space, is (marginally) f... check-in: 71773cb9e6 user: jan.nijtmans tags: core-8-4-branch | |
2013-04-09
| ||
11:06 | merge-mark check-in: 44252ce501 user: jan.nijtmans tags: core-8-5-branch | |
Changes
Changes to ChangeLog.
1 2 3 4 5 6 7 | 2013-04-08 Don Porter <[email protected]> * generic/regc_color.c: [Bug 3610026] Stop crash when the number of * generic/regerrs.h: "colors" in a regular expression overflows * generic/regex.h: a short int. Thanks to Heikki Linnakangas * generic/regguts.h: for the report and the patch. * tests/regexp.test: | > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 | 2013-04-12 Jan Nijtmans <[email protected]> * generic/tclDecls.h: Implement Tcl_Pkg* functions as (faster/stack-saving) macros around Tcl_Pkg*Ex functions. 2013-04-08 Don Porter <[email protected]> * generic/regc_color.c: [Bug 3610026] Stop crash when the number of * generic/regerrs.h: "colors" in a regular expression overflows * generic/regex.h: a short int. Thanks to Heikki Linnakangas * generic/regguts.h: for the report and the patch. * tests/regexp.test: |
︙ | ︙ |
Changes to generic/tclDecls.h.
︙ | ︙ | |||
6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 | /* !END!: Do not edit above this line. */ #undef TclUnusedStubEntry #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT /* * Deprecated Tcl procedures: */ #undef Tcl_EvalObj #define Tcl_EvalObj(interp,objPtr) \ Tcl_EvalObjEx((interp),(objPtr),0) #undef Tcl_GlobalEvalObj | > > > > > > > > > > | 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 | /* !END!: Do not edit above this line. */ #undef TclUnusedStubEntry #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT #undef Tcl_PkgPresent #define Tcl_PkgPresent(interp, name, version, exact) \ Tcl_PkgPresentEx(interp, name, version, exact, NULL) #undef Tcl_PkgProvide #define Tcl_PkgProvide(interp, name, version) \ Tcl_PkgProvideEx(interp, name, version, NULL) #undef Tcl_PkgRequire #define Tcl_PkgRequire(interp, name, version, exact) \ Tcl_PkgRequireEx(interp, name, version, exact, NULL) /* * Deprecated Tcl procedures: */ #undef Tcl_EvalObj #define Tcl_EvalObj(interp,objPtr) \ Tcl_EvalObjEx((interp),(objPtr),0) #undef Tcl_GlobalEvalObj |
︙ | ︙ |
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. */ { |
︙ | ︙ | |||
182 183 184 185 186 187 188 189 190 191 192 193 194 195 | * 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. */ | > | 183 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. * *---------------------------------------------------------------------- */ #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. */ |
︙ | ︙ | |||
651 652 653 654 655 656 657 658 659 660 661 662 663 664 | * * 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. */ | > | 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 | * * 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. */ |
︙ | ︙ | |||
917 918 919 920 921 922 923 | return TCL_ERROR; } if ((objc > 3) && (CheckVersionAndConvert(interp, TclGetString(objv[3]), NULL, NULL) == TCL_OK)) { version = TclGetString(objv[3]); } } | | | 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 | return TCL_ERROR; } if ((objc > 3) && (CheckVersionAndConvert(interp, TclGetString(objv[3]), NULL, NULL) == TCL_OK)) { version = TclGetString(objv[3]); } } Tcl_PkgPresentEx(interp, name, version, exact, NULL); return TCL_ERROR; break; } case PKG_PROVIDE: if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "package ?version?"); return TCL_ERROR; |
︙ | ︙ | |||
941 942 943 944 945 946 947 | } return TCL_OK; } argv3 = TclGetString(objv[3]); if (CheckVersionAndConvert(interp, argv3, NULL, NULL) != TCL_OK) { return TCL_ERROR; } | | | 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 | } return TCL_OK; } argv3 = TclGetString(objv[3]); if (CheckVersionAndConvert(interp, argv3, NULL, NULL) != TCL_OK) { return TCL_ERROR; } return Tcl_PkgProvideEx(interp, argv2, argv3, NULL); case PKG_REQUIRE: require: if (objc < 3) { requireSyntax: Tcl_WrongNumArgs(interp, 2, objv, "?-exact? package ?requirement...?"); return TCL_ERROR; |
︙ | ︙ |
Changes to unix/dltest/pkgb.c.
︙ | ︙ | |||
120 121 122 123 124 125 126 | if (Tcl_InitStubs(interp, "8.4", 0) == NULL) { if (Tcl_InitStubs(interp, "8.4-", 0) == NULL) { return TCL_ERROR; } Tcl_ResetResult(interp); } | | | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | if (Tcl_InitStubs(interp, "8.4", 0) == NULL) { if (Tcl_InitStubs(interp, "8.4-", 0) == NULL) { return TCL_ERROR; } Tcl_ResetResult(interp); } code = Tcl_PkgProvide(interp, "Pkgb", "2.3"); if (code != TCL_OK) { return code; } Tcl_CreateObjCommand(interp, "pkgb_sub", Pkgb_SubObjCmd, (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); Tcl_CreateObjCommand(interp, "pkgb_unsafe", Pkgb_UnsafeObjCmd, (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); |
︙ | ︙ | |||
161 162 163 164 165 166 167 | if (Tcl_InitStubs(interp, "8.4", 0) == NULL) { if (Tcl_InitStubs(interp, "8.4-", 0) == NULL) { return TCL_ERROR; } Tcl_ResetResult(interp); } | | | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | if (Tcl_InitStubs(interp, "8.4", 0) == NULL) { if (Tcl_InitStubs(interp, "8.4-", 0) == NULL) { return TCL_ERROR; } Tcl_ResetResult(interp); } code = Tcl_PkgProvide(interp, "Pkgb", "2.3"); if (code != TCL_OK) { return code; } Tcl_CreateObjCommand(interp, "pkgb_sub", Pkgb_SubObjCmd, (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); return TCL_OK; } |