--- a/Method.st Sat Sep 21 16:23:47 1996 +0200
+++ b/Method.st Sun Sep 22 15:01:43 1996 +0200
@@ -1277,14 +1277,17 @@
int nargs;
OBJ *ap;
+ /*
+ * args must be an array, or nil
+ */
if (__isArray(argArray)) {
nargs = __arraySize(argArray);
ap = __ArrayInstPtr(argArray)->a_element;
} else {
- if (argArray == nil) {
- nargs = 0;
- } else
- nargs = -1;
+ if (argArray != nil) {
+ goto badArgs;
+ }
+ nargs = 0;
}
#ifdef F_NARGS
@@ -1376,77 +1379,77 @@
} else {
/* interpreted code */
#ifdef PASS_ARG_POINTER
- RETURN ( __interpret(self, nargs, anObject, aSymbol, SND_COMMA searchClass, ap) );
+ RETURN ( __interpret(self, nargs, anObject, aSymbol, SND_COMMA searchClass, &dummy, ap) );
#else
switch (nargs) {
case 0:
- RETURN ( __interpret(self, 0, anObject, aSymbol, SND_COMMA searchClass) );
+ RETURN ( __interpret(self, 0, anObject, aSymbol, SND_COMMA searchClass, &dummy) );
case 1:
- RETURN ( __interpret(self, 1, anObject, aSymbol, SND_COMMA searchClass,
+ RETURN ( __interpret(self, 1, anObject, aSymbol, SND_COMMA searchClass, &dummy,
ap[0]) );
case 2:
- RETURN ( __interpret(self, 2, anObject, aSymbol, SND_COMMA searchClass,
+ RETURN ( __interpret(self, 2, anObject, aSymbol, SND_COMMA searchClass, &dummy,
ap[0], ap[1]) );
case 3:
- RETURN ( __interpret(self, 3, anObject, aSymbol, SND_COMMA searchClass,
+ RETURN ( __interpret(self, 3, anObject, aSymbol, SND_COMMA searchClass, &dummy,
ap[0], ap[1], ap[2]) );
case 4:
- RETURN ( __interpret(self, 4, anObject, aSymbol, SND_COMMA searchClass,
+ RETURN ( __interpret(self, 4, anObject, aSymbol, SND_COMMA searchClass, &dummy,
ap[0], ap[1], ap[2], ap[3]) );
case 5:
- RETURN ( __interpret(self, 5, anObject, aSymbol, SND_COMMA searchClass,
+ RETURN ( __interpret(self, 5, anObject, aSymbol, SND_COMMA searchClass, &dummy,
ap[0], ap[1], ap[2], ap[3], ap[4]) );
case 6:
- RETURN ( __interpret(self, 6, anObject, aSymbol, SND_COMMA searchClass,
+ RETURN ( __interpret(self, 6, anObject, aSymbol, SND_COMMA searchClass, &dummy,
ap[0], ap[1], ap[2], ap[3], ap[4], ap[5]) );
case 7:
- RETURN ( __interpret(self, 7, anObject, aSymbol, SND_COMMA searchClass,
+ RETURN ( __interpret(self, 7, anObject, aSymbol, SND_COMMA searchClass, &dummy,
ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6]) );
case 8:
- RETURN ( __interpret(self, 8, anObject, aSymbol, SND_COMMA searchClass,
+ RETURN ( __interpret(self, 8, anObject, aSymbol, SND_COMMA searchClass, &dummy,
ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6],
ap[7]) );
case 9:
- RETURN ( __interpret(self, 9, anObject, aSymbol, SND_COMMA searchClass,
+ RETURN ( __interpret(self, 9, anObject, aSymbol, SND_COMMA searchClass, &dummy,
ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6],
ap[7], ap[8]) );
case 10:
- RETURN ( __interpret(self, 10, anObject, aSymbol, SND_COMMA searchClass,
+ RETURN ( __interpret(self, 10, anObject, aSymbol, SND_COMMA searchClass, &dummy,
ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6],
ap[7], ap[8], ap[9]) );
case 11:
- RETURN ( __interpret(self, 11, anObject, aSymbol, SND_COMMA searchClass,
+ RETURN ( __interpret(self, 11, anObject, aSymbol, SND_COMMA searchClass, &dummy,
ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6],
ap[7], ap[8], ap[9], ap[10]) );
case 12:
- RETURN ( __interpret(self, 12, anObject, aSymbol, SND_COMMA searchClass,
+ RETURN ( __interpret(self, 12, anObject, aSymbol, SND_COMMA searchClass, &dummy,
ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6],
ap[7], ap[8], ap[9], ap[11]) );
case 13:
- RETURN ( __interpret(self, 13, anObject, aSymbol, SND_COMMA searchClass,
+ RETURN ( __interpret(self, 13, anObject, aSymbol, SND_COMMA searchClass, &dummy,
ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6],
ap[7], ap[8], ap[9], ap[11], ap[12]) );
case 14:
- RETURN ( __interpret(self, 14, anObject, aSymbol, SND_COMMA searchClass,
+ RETURN ( __interpret(self, 14, anObject, aSymbol, SND_COMMA searchClass, &dummy,
ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6],
ap[7], ap[8], ap[9], ap[11], ap[12], ap[13]) );
case 15:
- RETURN ( __interpret(self, 15, anObject, aSymbol, SND_COMMA searchClass,
+ RETURN ( __interpret(self, 15, anObject, aSymbol, SND_COMMA searchClass, &dummy,
ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6],
ap[7], ap[8], ap[9], ap[11], ap[12], ap[13], ap[14]) );
}
@@ -1454,6 +1457,7 @@
}
}
}
+ badArgs: ;
%}.
(argArray isMemberOf:Array) ifFalse:[
"
@@ -2141,6 +2145,6 @@
!Method class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.93 1996-08-02 18:13:32 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.94 1996-09-22 13:01:20 cg Exp $'
! !
Method initialize!