summaryrefslogtreecommitdiffstats
path: root/generic/tclPkg.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclPkg.c')
-rw-r--r--generic/tclPkg.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index bdd9a86..89fb0c4 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -285,7 +285,7 @@ TclPkgFileSeen(
Tcl_Obj *list;
if (isNew) {
- list = Tcl_NewObj();
+ TclNewObj(list);
Tcl_SetHashValue(entry, list);
Tcl_IncrRefCount(list);
} else {
@@ -1073,7 +1073,7 @@ TclNRPackageObjCmd(
"present", "provide", "require", "unknown", "vcompare",
"versions", "vsatisfies", NULL
};
- enum pkgOptions {
+ enum pkgOptionsEnum {
PKG_FILES, PKG_FORGET, PKG_IFNEEDED, PKG_NAMES, PKG_PREFER,
PKG_PRESENT, PKG_PROVIDE, PKG_REQUIRE, PKG_UNKNOWN, PKG_VCOMPARE,
PKG_VERSIONS, PKG_VSATISFIES
@@ -1099,7 +1099,7 @@ TclNRPackageObjCmd(
&optionIndex) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum pkgOptions) optionIndex) {
+ switch ((enum pkgOptionsEnum) optionIndex) {
case PKG_FILES: {
PkgFiles *pkgFiles;
@@ -1241,7 +1241,7 @@ TclNRPackageObjCmd(
} else {
Tcl_Obj *resultObj;
- resultObj = Tcl_NewObj();
+ TclNewObj(resultObj);
tablePtr = &iPtr->packageTable;
for (hPtr = Tcl_FirstHashEntry(tablePtr, &search); hPtr != NULL;
hPtr = Tcl_NextHashEntry(&search)) {
@@ -1368,9 +1368,9 @@ TclNRPackageObjCmd(
newObjvPtr, NULL);
return TCL_OK;
} else {
- int i, newobjc = objc-3;
Tcl_Obj *const *newobjv = objv + 3;
+ newobjc = objc - 3;
if (CheckAllRequirements(interp, objc-3, objv+3) != TCL_OK) {
return TCL_ERROR;
}
@@ -1481,7 +1481,7 @@ TclNRPackageObjCmd(
*/
Tcl_SetObjResult(interp,
- Tcl_NewIntObj(CompareVersions(iva, ivb, NULL)));
+ Tcl_NewWideIntObj(CompareVersions(iva, ivb, NULL)));
ckfree(iva);
ckfree(ivb);
break;
@@ -1490,8 +1490,9 @@ TclNRPackageObjCmd(
Tcl_WrongNumArgs(interp, 2, objv, "package");
return TCL_ERROR;
} else {
- Tcl_Obj *resultObj = Tcl_NewObj();
+ Tcl_Obj *resultObj;
+ TclNewObj(resultObj);
argv2 = TclGetString(objv[2]);
hPtr = Tcl_FindHashEntry(&iPtr->packageTable, argv2);
if (hPtr != NULL) {