(DeallocationHelpers): New category containing _empty and

_collectionDeallocate.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@188 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mccallum 1995-03-23 03:51:07 +00:00
parent 4e2f5f4645
commit 24ff419bff
2 changed files with 26 additions and 2 deletions

View file

@ -42,6 +42,18 @@
- (void) _decodeContentsWithCoder: (Coder*)aCoder;
@end
@interface Collection (DeallocationHelpers)
/* Empty the internals of a collection after the contents have
already been released. */
- _empty;
/* Deallocate the internals of a collection after the contents
have already been released. */
- (void) _collectionDealloc;
@end
/* To be used inside methods for getting the element comparison function.
This macro could be redefined when the comparison function is an
@ -74,7 +86,7 @@
/* Used inside a method for sending "-autorelease" if necessary */
#define AUTORELEASE_ELT(ELT) \
({if (CONTAINS_OBJECTS) ((elt)[ELT.id_u autorelease]) else ELT;})
((CONTAINS_OBJECTS) ? ((elt)[ELT.id_u autorelease]) : ELT)
/* Error Handling */

View file

@ -42,6 +42,18 @@
- (void) _decodeContentsWithCoder: (Coder*)aCoder;
@end
@interface Collection (DeallocationHelpers)
/* Empty the internals of a collection after the contents have
already been released. */
- _empty;
/* Deallocate the internals of a collection after the contents
have already been released. */
- (void) _collectionDealloc;
@end
/* To be used inside methods for getting the element comparison function.
This macro could be redefined when the comparison function is an
@ -74,7 +86,7 @@
/* Used inside a method for sending "-autorelease" if necessary */
#define AUTORELEASE_ELT(ELT) \
({if (CONTAINS_OBJECTS) ((elt)[ELT.id_u autorelease]) else ELT;})
((CONTAINS_OBJECTS) ? ((elt)[ELT.id_u autorelease]) : ELT)
/* Error Handling */