Skip to content
Browse files

Add addObject method for JArray

  • Loading branch information...
1 parent 8215763 commit 6bc74a17c0623c502da580dc8248f85fbda6b34b @confucious committed Oct 12, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 JSONKit.m
View
4 JSONKit.m
@@ -790,6 +790,10 @@ - (void)removeObjectAtIndex:(NSUInteger)objectIndex
mutations = (mutations == NSUIntegerMax) ? 1UL : mutations + 1UL;
}
+- (void)addObject:(id)anObject {
+ [self insertObject: anObject atIndex: count];
+}
+
- (void)replaceObjectAtIndex:(NSUInteger)objectIndex withObject:(id)anObject
{
if(mutations == 0UL) { [NSException raise:NSInternalInconsistencyException format:@"*** -[%@ %@]: mutating method sent to immutable object", NSStringFromClass([self class]), NSStringFromSelector(_cmd)]; }

0 comments on commit 6bc74a1

Please sign in to comment.
Something went wrong with that request. Please try again.