Commit graph

1583 commits

Author SHA1 Message Date
Andrew McCallum
8bd1cc3118 Declare classes NSDate and NSTimer.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1342 72102866-910b-0410-8b05-ffd578937521
1996-04-10 18:21:12 +00:00
Andrew McCallum
240f96946f New file.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1341 72102866-910b-0410-8b05-ffd578937521
1996-04-10 18:20:36 +00:00
Andrew McCallum
b323dabc31 ([NSAutoreleasePool -dealloc]): When unintalling ourselves at the
current pool, and setting our parent to be the current pool, be sure
to set our parent's _CHILD ivar to nil.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1340 72102866-910b-0410-8b05-ffd578937521
1996-04-10 16:40:25 +00:00
Andrew McCallum
459308b0a3 (mframe_do_call): Use sel_get_type() instead of
class_get_instance_method() to get the selector type.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1339 72102866-910b-0410-8b05-ffd578937521
1996-04-10 16:37:30 +00:00
Andrew McCallum
3556ba6270 *** empty log message ***
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1338 72102866-910b-0410-8b05-ffd578937521
1996-04-10 00:22:53 +00:00
Andrew McCallum
18a8b28a16 (mframe_do_call): When getting the instance method, just use
object->class_pointer, not object_get_class(), because
object_get_class() of a class will return the argument, not the
metaclass---we want the metaclass.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1337 72102866-910b-0410-8b05-ffd578937521
1996-04-09 23:55:42 +00:00
Andrew McCallum
c2b688a5ea ([TcpInPort +newForReceivingFromPortNumber:]): Bind the socket with
INADDR_ANY, (not the host's address), so that others can connect using
any of the host's interfaces, including localhost.  Add the host's
address to _LISTENING_ADDRESS after the bind().


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1336 72102866-910b-0410-8b05-ffd578937521
1996-04-09 03:02:20 +00:00
Andrew McCallum
6d43bc6533 ([NSDictionary -allKeysForObject:]): Ask SELF for objectForKey:, not K.
(Reported by Robert Quillen <rquillen@csugrad.cs.vt.edu>).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1335 72102866-910b-0410-8b05-ffd578937521
1996-04-08 17:19:16 +00:00
Andrew McCallum
dfdb72ccb1 *** empty log message ***
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1334 72102866-910b-0410-8b05-ffd578937521
1996-04-01 02:52:31 +00:00
Andrew McCallum
2f7ae60a2d (ABS): Remove macro.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1333 72102866-910b-0410-8b05-ffd578937521
1996-04-01 02:52:12 +00:00
Andrew McCallum
3f2e0a57c3 Declare @class NSMutableArrayNonCore, not NSMutableArray.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1332 72102866-910b-0410-8b05-ffd578937521
1996-04-01 02:51:33 +00:00
Andrew McCallum
bdc87d4dba ([MappedCollector -nextObjectAndKey:withEnumState:]): Add comment.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1331 72102866-910b-0410-8b05-ffd578937521
1996-04-01 02:50:55 +00:00
Andrew McCallum
303c5ad70c (main): Updated for new collection scheme.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1330 72102866-910b-0410-8b05-ffd578937521
1996-04-01 02:42:06 +00:00
Andrew McCallum
8de44d50d1 ([MappedCollector -newEnumState]): New method.
([MappedCollector -freeEnumState:]): New method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1329 72102866-910b-0410-8b05-ffd578937521
1996-04-01 02:41:44 +00:00
Andrew McCallum
438776d6f3 (ABS): Remove macro; now defined in objects/stdobjects.h.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1328 72102866-910b-0410-8b05-ffd578937521
1996-03-31 23:15:12 +00:00
Andrew McCallum
2c66e11f59 Declare new function names.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1327 72102866-910b-0410-8b05-ffd578937521
1996-03-31 22:46:59 +00:00
Andrew McCallum
738fe577c4 Add #ifndef/#endif wrapper around header file.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1326 72102866-910b-0410-8b05-ffd578937521
1996-03-31 22:46:44 +00:00
Andrew McCallum
0f3872167e (behavior_class_add_class): Function renamed from class_add_behavior.
Add more explanation to NSCAssert().
(class_add_behavior): New function, calling above function.
(behavior_class_add_category): New function.
(behavior_class_add_methods): Function renamed from
class_add_methods_if_not_there.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1325 72102866-910b-0410-8b05-ffd578937521
1996-03-31 22:46:14 +00:00
Andrew McCallum
c8954cfab5 ([NSGArray +initialize]): Add the NSArrayNonCore behavior, so we can,
once and for all, avoid the need for those odd [super ...] calls, and
can remove many methods.
([NSGArray -initWithObjects:count:]): Method removed.
([NSGArray -indexOfObject:]): Method removed.
([NSGArray -objectAtIndex:]): Method removed.
([NSGMutableArray +initialize]): Add the NSMutableArrayNonCore
behavior, as above.
([NSGMutableArray -replaceObjectAtIndex:withObject:]): Method removed.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1324 72102866-910b-0410-8b05-ffd578937521
1996-03-31 22:34:27 +00:00
Andrew McCallum
379fe835f5 Divide methods between NSArray and NSArrayNonCore classes. Add
NSArrayNonCore behavior to NSArray.
Divide methods between NSMutableArray and NSMutableArrayNonCore
classes.  Add NSArrayNonCore behavior to NSArray.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1323 72102866-910b-0410-8b05-ffd578937521
1996-03-31 22:23:37 +00:00
Andrew McCallum
8ef23c9aad Include <objects/Notification.h>
(NSNotification): Add placeholder ivars so our instance size matches
that of the behavior class that will be added.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1322 72102866-910b-0410-8b05-ffd578937521
1996-03-31 22:17:01 +00:00
Andrew McCallum
b0fce5a145 (NSGArray, NSGMutableArray): Add placeholder ivars so our instance
size matches that of the behavior class that will be added.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1321 72102866-910b-0410-8b05-ffd578937521
1996-03-31 22:16:22 +00:00
Andrew McCallum
64f905783d Separate core and non-core methods. Declare with @class the new
classes NSArrayNonCore and NSMutableArrayNonCore.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1320 72102866-910b-0410-8b05-ffd578937521
1996-03-31 22:14:35 +00:00
Andrew McCallum
b8f0b79536 Include <objects/stdobjects.h>.
(class_add_behavior): Use NSCAssert() to make sure that we don't try
to increase the instance size of a class that has been subclassed;
(hopeless ivar layout confusion would result).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1319 72102866-910b-0410-8b05-ffd578937521
1996-03-31 21:54:02 +00:00
Andrew McCallum
e6fee2e397 (GNU_CFILES): Removed behavior.c.
(GNU_MFILES): Added behavior.m.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1318 72102866-910b-0410-8b05-ffd578937521
1996-03-31 21:43:41 +00:00
Andrew McCallum
227b53dda4 *** empty log message ***
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1317 72102866-910b-0410-8b05-ffd578937521
1996-03-31 21:41:02 +00:00
Andrew McCallum
9ddcc8e9d5 (main): Use renamed method behavior_set_debug.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1316 72102866-910b-0410-8b05-ffd578937521
1996-03-31 04:34:14 +00:00
Andrew McCallum
6de6e2c240 Fix typo.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1315 72102866-910b-0410-8b05-ffd578937521
1996-03-31 04:00:05 +00:00
Andrew McCallum
82eb5732bd ([NSArray -lastObject]): Don't assert count; just return nil if it's
empty.
([NSMutableArray -removeLastObject]): Don't assert count; raise
NSRangeError if it's empty.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1314 72102866-910b-0410-8b05-ffd578937521
1996-03-30 23:00:27 +00:00
Andrew McCallum
6298e0f17a *** empty log message ***
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1313 72102866-910b-0410-8b05-ffd578937521
1996-03-30 22:48:40 +00:00
Andrew McCallum
b81efade7a ([ConstantCollection -printCount]): Use object_get_class_name()
instead of sending -name.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1312 72102866-910b-0410-8b05-ffd578937521
1996-03-30 22:43:33 +00:00
Andrew McCallum
54acc69932 Make NSAutoreleasePools co-exist with exceptions, safely and without
leaks.  Also improve efficiency by using a linked list of arrays
instead of realloc when more space is needed, and by using a cache of
pools that helps avoid the allocation/deallocation of pools.
(push_pool_to_cache): New function.
(pop_pool_from_cache): New function.
([NSAutoreleasePool +initialize]): New method.
([NSAutoreleasePool +allocWithZone:]): New method.
([NSAutoreleasePool -init]): Method overhauled to initialize new ivar
for handling exceptions, _child; also use pool cache.
(total_autoreleased_objects_count): New static variable.
(BEGINNING_POOL_SIZE): Macro renamed from DEFAULT_SIZE.
(autorelease_pool_cache, autorelease_pool_cache_size,
autorelease_pool_cache_count): New static variables.
([NSAutoreleasePool -_setChildPool:]): New method, handling stack and
dealing with exceptions.
([NSAutoreleasePool -addObject:]): Deal with linked list of arrays.
([NSAutoreleasePool -dealloc]): Deal with exceptions by releasing
child pools.  Place self into the pool cache instead of deallocating.
([NSAutoreleasePool +resetTotalAutoreleasedObjects]): New method.
([NSAutoreleasePool +totalAutoreleasedObjects]): New method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1311 72102866-910b-0410-8b05-ffd578937521
1996-03-30 22:39:48 +00:00
Andrew McCallum
f03cc597e1 Fix typo.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1310 72102866-910b-0410-8b05-ffd578937521
1996-03-30 22:22:20 +00:00
Andrew McCallum
deb6958fe6 Change return types of "grow factor" methods from unsigned to int.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1309 72102866-910b-0410-8b05-ffd578937521
1996-03-30 22:21:48 +00:00
Andrew McCallum
44a604d900 ([IndexedCollection -removeObject:]): Use unsigned for index, not int.
([IndexedCollection -replaceObject:withObject:]): Likewise.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1308 72102866-910b-0410-8b05-ffd578937521
1996-03-30 22:21:11 +00:00
Andrew McCallum
7e13e4966d Declare new ivars and methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1307 72102866-910b-0410-8b05-ffd578937521
1996-03-30 22:20:43 +00:00
Andrew McCallum
f0408db3fb Declare new methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1306 72102866-910b-0410-8b05-ffd578937521
1996-03-30 22:20:26 +00:00
Andrew McCallum
97e6ad9b21 (NO_INDEX): Change from UINT_MAX to NSNotFound, so that Array and
NSArray can coexist.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1305 72102866-910b-0410-8b05-ffd578937521
1996-03-30 22:07:46 +00:00
Andrew McCallum
0a4dd31b8a ([NSArray -isEqualToArray:]): Fix typo; reverse test before returning no.
([NSArray -arrayByAddingObject:]): New function, from Scott
Christley.
([NSArray -arrayByAddingObjectsFromArray:]): Likewise.
([NSArray -subarrayWithRange:]): Implemented by Scott Christely.
([NSMutableArray -removeObjectIdenticalTo:]): Don't fail if the object
is not present.
([NSMutableArray -removeObject:]): Likewise.
([NSMutableArray -removeAllObjects]): Implemented by Scott Christley.
([NSMutableArray -setArray:]): New function, from Scott Christley.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1304 72102866-910b-0410-8b05-ffd578937521
1996-03-30 19:14:43 +00:00
Andrew McCallum
433dd8ef66 ([IndexedCollection -removeObject:]): Now removes *all* instances of
ANOBJECT, not just one.
([IndexedCollection -replaceObject:withObject:]): Now replaces *all*
instances of OLDOBJECT, not just one.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1303 72102866-910b-0410-8b05-ffd578937521
1996-03-30 19:04:35 +00:00
Andrew McCallum
5054040415 (ABS): New macro, defined if not already defined.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1302 72102866-910b-0410-8b05-ffd578937521
1996-03-30 16:01:43 +00:00
Andrew McCallum
3eb99042d6 Fix typos in method types.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1301 72102866-910b-0410-8b05-ffd578937521
1996-03-30 15:58:28 +00:00
Andrew McCallum
c721e0da0e (Array _grow_factor): Change type of ivar from unsigned to int.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1300 72102866-910b-0410-8b05-ffd578937521
1996-03-30 15:06:46 +00:00
Andrew McCallum
b9fabc2237 ([Array +defaultGrowFactor]): Return type changed to int.
([Array -growFactor]): Likewise.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1299 72102866-910b-0410-8b05-ffd578937521
1996-03-30 15:06:20 +00:00
Andrew McCallum
7867d0a082 Add new semantic to ivar _grow_factor: if it is less than 0, the array
grows by -_grow_factor, but never shrinks.
(incrementCount): Use the ABS() of _grow_factor.
(decrementCount): Only shrink the array if _grow_factor is > 0.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1298 72102866-910b-0410-8b05-ffd578937521
1996-03-30 15:05:15 +00:00
Andrew McCallum
ef2a25f184 *** empty log message ***
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1297 72102866-910b-0410-8b05-ffd578937521
1996-03-30 01:39:41 +00:00
Andrew McCallum
a4f3e36ac7 ([Server -returnFloat]): Append float const with `f'. Include
<objects/Proxy.h> for -connectionForProxy.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1296 72102866-910b-0410-8b05-ffd578937521
1996-03-30 01:35:14 +00:00
Andrew McCallum
8d74080c8f (main): Print the float and double before sending it.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1295 72102866-910b-0410-8b05-ffd578937521
1996-03-30 01:34:25 +00:00
Andrew McCallum
1029a15c66 (main): Decode the float and double.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1294 72102866-910b-0410-8b05-ffd578937521
1996-03-30 01:33:56 +00:00
Andrew McCallum
ff190a3a03 Declare new method names, and comment.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1293 72102866-910b-0410-8b05-ffd578937521
1996-03-30 01:33:05 +00:00