summaryrefslogtreecommitdiffstats
path: root/generic/tclOOMethod.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclOOMethod.c')
-rw-r--r--generic/tclOOMethod.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c
index 81e94c6..c8b97a5 100644
--- a/generic/tclOOMethod.c
+++ b/generic/tclOOMethod.c
@@ -387,17 +387,17 @@ TclOONewProcMethod(
* structure's contents. NULL if caller is not
* interested. */
{
- int argsLen; /* -1 => delete argsObj before exit */
+ size_t argsLen; /* TCL_INDEX_NONE => delete argsObj before exit */
ProcedureMethod *pmPtr;
const char *procName;
Tcl_Method method;
if (argsObj == NULL) {
- argsLen = -1;
+ argsLen = TCL_INDEX_NONE;
TclNewObj(argsObj);
Tcl_IncrRefCount(argsObj);
procName = "<destructor>";
- } else if (TclListObjLength_(interp, argsObj, &argsLen) != TCL_OK) {
+ } else if (Tcl_ListObjLength(interp, argsObj, &argsLen) != TCL_OK) {
return NULL;
} else {
procName = (nameObj==NULL ? "<constructor>" : TclGetString(nameObj));
@@ -412,7 +412,7 @@ TclOONewProcMethod(
method = TclOOMakeProcMethod(interp, clsPtr, flags, nameObj, procName,
argsObj, bodyObj, &procMethodType, pmPtr, &pmPtr->procPtr);
- if (argsLen == -1) {
+ if (argsLen == TCL_INDEX_NONE) {
Tcl_DecrRefCount(argsObj);
}
if (method == NULL) {
@@ -1387,10 +1387,10 @@ TclOONewForwardInstanceMethod(
Tcl_Obj *prefixObj) /* List of arguments that form the command
* prefix to forward to. */
{
- int prefixLen;
+ size_t prefixLen;
ForwardMethod *fmPtr;
- if (TclListObjLength_(interp, prefixObj, &prefixLen) != TCL_OK) {
+ if (Tcl_ListObjLength(interp, prefixObj, &prefixLen) != TCL_OK) {
return NULL;
}
if (prefixLen < 1) {
@@ -1426,10 +1426,10 @@ TclOONewForwardMethod(
Tcl_Obj *prefixObj) /* List of arguments that form the command
* prefix to forward to. */
{
- int prefixLen;
+ size_t prefixLen;
ForwardMethod *fmPtr;
- if (TclListObjLength_(interp, prefixObj, &prefixLen) != TCL_OK) {
+ if (Tcl_ListObjLength(interp, prefixObj, &prefixLen) != TCL_OK) {
return NULL;
}
if (prefixLen < 1) {
@@ -1468,7 +1468,9 @@ InvokeForwardMethod(
CallContext *contextPtr = (CallContext *) context;
ForwardMethod *fmPtr = (ForwardMethod *)clientData;
Tcl_Obj **argObjs, **prefixObjs;
- int numPrefixes, len, skip = contextPtr->skip;
+ size_t numPrefixes;
+ int len;
+ int skip = contextPtr->skip;
/*
* Build the real list of arguments to use. Note that we know that the
@@ -1477,7 +1479,7 @@ InvokeForwardMethod(
* can ignore here.
*/
- TclListObjGetElements_(NULL, fmPtr->prefixObj, &numPrefixes, &prefixObjs);
+ Tcl_ListObjGetElements(NULL, fmPtr->prefixObj, &numPrefixes, &prefixObjs);
argObjs = InitEnsembleRewrite(interp, objc, objv, skip,
numPrefixes, prefixObjs, &len);
Tcl_NRAddCallback(interp, FinalizeForwardCall, argObjs, NULL, NULL, NULL);