summaryrefslogtreecommitdiffstats
path: root/generic/tclOODefineCmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclOODefineCmds.c')
-rw-r--r--generic/tclOODefineCmds.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c
index bacab38..633e088 100644
--- a/generic/tclOODefineCmds.c
+++ b/generic/tclOODefineCmds.c
@@ -439,7 +439,7 @@ RenameDeleteMethod(
if (hPtr == newHPtr) {
renameToSelf:
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "cannot rename method to itself", -1));
+ "cannot rename method to itself", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "RENAME_TO_SELF", NULL);
return TCL_ERROR;
} else if (!isNew) {
@@ -515,7 +515,7 @@ TclOOUnknownDefinition(
if (objc < 2) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "bad call of unknown handler", -1));
+ "bad call of unknown handler", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "BAD_UNKNOWN", NULL);
return TCL_ERROR;
}
@@ -548,7 +548,7 @@ TclOOUnknownDefinition(
Tcl_Obj **newObjv = TclStackAlloc(interp, sizeof(Tcl_Obj*)*(objc-1));
int result;
- newObjv[0] = Tcl_NewStringObj(matchedStr, -1);
+ newObjv[0] = Tcl_NewStringObj(matchedStr, TCL_NOSIZE);
Tcl_IncrRefCount(newObjv[0]);
if (objc > 2) {
memcpy(newObjv+1, objv+2, sizeof(Tcl_Obj *) * (objc-2));
@@ -651,7 +651,7 @@ InitDefineContext(
if (namespacePtr == NULL) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"cannot process definitions; support namespace deleted",
- -1));
+ TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
}
@@ -691,7 +691,7 @@ TclOOGetDefineCmdContext(
|| (iPtr->varFramePtr->isProcCallFrame != FRAME_IS_OO_DEFINE)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"this command may only be called from within the context of"
- " an ::oo::define or ::oo::objdefine command", -1));
+ " an ::oo::define or ::oo::objdefine command", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return NULL;
}
@@ -699,7 +699,7 @@ TclOOGetDefineCmdContext(
if (Tcl_ObjectDeleted(object)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"this command cannot be called when the object has been"
- " deleted", -1));
+ " deleted", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return NULL;
}
@@ -740,7 +740,7 @@ GetClassInOuterContext(
return NULL;
}
if (oPtr->classPtr == NULL) {
- Tcl_SetObjResult(interp, Tcl_NewStringObj(errMsg, -1));
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(errMsg, TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CLASS",
TclGetString(className), NULL);
return NULL;
@@ -1166,13 +1166,13 @@ TclOODefineClassObjCmd(
}
if (oPtr->flags & ROOT_OBJECT) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "may not modify the class of the root object class", -1));
+ "may not modify the class of the root object class", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
}
if (oPtr->flags & ROOT_CLASS) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "may not modify the class of the class of classes", -1));
+ "may not modify the class of the class of classes", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
}
@@ -1323,7 +1323,7 @@ TclOODefineDeleteMethodObjCmd(
}
if (!isInstanceDeleteMethod && !oPtr->classPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "attempt to misuse API", -1));
+ "attempt to misuse API", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
}
@@ -1447,7 +1447,7 @@ TclOODefineExportObjCmd(
clsPtr = oPtr->classPtr;
if (!isInstanceExport && !clsPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "attempt to misuse API", -1));
+ "attempt to misuse API", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
}
@@ -1539,7 +1539,7 @@ TclOODefineForwardObjCmd(
}
if (!isInstanceForward && !oPtr->classPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "attempt to misuse API", -1));
+ "attempt to misuse API", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
}
@@ -1597,7 +1597,7 @@ TclOODefineMethodObjCmd(
}
if (!isInstanceMethod && !oPtr->classPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "attempt to misuse API", -1));
+ "attempt to misuse API", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
}
@@ -1649,7 +1649,7 @@ TclOODefineMixinObjCmd(
}
if (!isInstanceMixin && !oPtr->classPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "attempt to misuse API", -1));
+ "attempt to misuse API", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
}
@@ -1664,7 +1664,7 @@ TclOODefineMixinObjCmd(
}
if (!isInstanceMixin && TclOOIsReachable(oPtr->classPtr, clsPtr)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "may not mix a class into itself", -1));
+ "may not mix a class into itself", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "SELF_MIXIN", NULL);
goto freeAndError;
}
@@ -1716,7 +1716,7 @@ TclOODefineRenameMethodObjCmd(
}
if (!isInstanceRenameMethod && !oPtr->classPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "attempt to misuse API", -1));
+ "attempt to misuse API", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
}
@@ -1777,7 +1777,7 @@ TclOODefineUnexportObjCmd(
clsPtr = oPtr->classPtr;
if (!isInstanceUnexport && !clsPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "attempt to misuse API", -1));
+ "attempt to misuse API", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
}
@@ -1904,8 +1904,8 @@ TclOODefineSlots(
Foundation *fPtr)
{
const struct DeclaredSlot *slotInfoPtr;
- Tcl_Obj *getName = Tcl_NewStringObj("Get", -1);
- Tcl_Obj *setName = Tcl_NewStringObj("Set", -1);
+ Tcl_Obj *getName = Tcl_NewStringObj("Get", TCL_NOSIZE);
+ Tcl_Obj *setName = Tcl_NewStringObj("Set", TCL_NOSIZE);
Class *slotCls;
slotCls = ((Object *) Tcl_NewObjectInstance(fPtr->interp, (Tcl_Class)
@@ -1963,7 +1963,7 @@ ClassFilterGet(
return TCL_ERROR;
} else if (!oPtr->classPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "attempt to misuse API", -1));
+ "attempt to misuse API", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
}
@@ -1999,7 +1999,7 @@ ClassFilterSet(
return TCL_ERROR;
} else if (!oPtr->classPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "attempt to misuse API", -1));
+ "attempt to misuse API", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
} else if (Tcl_ListObjGetElements(interp, objv[0], &filterc,
@@ -2043,7 +2043,7 @@ ClassMixinGet(
return TCL_ERROR;
} else if (!oPtr->classPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "attempt to misuse API", -1));
+ "attempt to misuse API", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
}
@@ -2082,7 +2082,7 @@ ClassMixinSet(
return TCL_ERROR;
} else if (!oPtr->classPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "attempt to misuse API", -1));
+ "attempt to misuse API", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
} else if (Tcl_ListObjGetElements(interp, objv[0], &mixinc,
@@ -2100,7 +2100,7 @@ ClassMixinSet(
}
if (TclOOIsReachable(oPtr->classPtr, mixins[i])) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "may not mix a class into itself", -1));
+ "may not mix a class into itself", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "SELF_MIXIN", NULL);
goto freeAndError;
}
@@ -2147,7 +2147,7 @@ ClassSuperGet(
return TCL_ERROR;
} else if (!oPtr->classPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "attempt to misuse API", -1));
+ "attempt to misuse API", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
}
@@ -2185,12 +2185,12 @@ ClassSuperSet(
return TCL_ERROR;
} else if (!oPtr->classPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "attempt to misuse API", -1));
+ "attempt to misuse API", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
} else if (oPtr == oPtr->fPtr->objectCls->thisPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "may not modify the superclass of the root object", -1));
+ "may not modify the superclass of the root object", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
} else if (Tcl_ListObjGetElements(interp, objv[0], &superc,
@@ -2217,14 +2217,14 @@ ClassSuperSet(
for (j=0 ; j<i ; j++) {
if (superclasses[j] == superclasses[i]) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "class should only be a direct superclass once", -1));
+ "class should only be a direct superclass once", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "REPETITIOUS", NULL);
goto failedAfterAlloc;
}
}
if (TclOOIsReachable(oPtr->classPtr, superclasses[i])) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "attempt to form circular dependency graph", -1));
+ "attempt to form circular dependency graph", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "CIRCULARITY", NULL);
failedAfterAlloc:
ckfree((char *) superclasses);
@@ -2286,7 +2286,7 @@ ClassVarsGet(
return TCL_ERROR;
} else if (!oPtr->classPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "attempt to misuse API", -1));
+ "attempt to misuse API", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
}
@@ -2323,7 +2323,7 @@ ClassVarsSet(
return TCL_ERROR;
} else if (!oPtr->classPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "attempt to misuse API", -1));
+ "attempt to misuse API", TCL_NOSIZE));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
return TCL_ERROR;
} else if (Tcl_ListObjGetElements(interp, objv[0], &varc,