Permalink
Browse files

fixed warnings.

  • Loading branch information...
1 parent 82b6cc6 commit 9ed239622e1697c3a28cd399eeb64399d10fa79e Tim Burks committed Nov 24, 2010
Showing with 13 additions and 4 deletions.
  1. +13 −4 objc/NuBSON.m
View
@@ -1,8 +1,18 @@
#import "NuBSON.h"
#include "bson.h"
+@protocol NuCellProtocol
+- (id) car;
+- (id) cdr;
+@end
+
+@protocol NuSymbolProtocol
+- (NSString *) labelName;
+@end
+
@interface NuBSON (Private)
- (NuBSON *) initWithBSON:(bson) b;
+- (id) initWithObjectIDPointer:(const bson_oid_t *) objectIDPointer;
@end
@implementation NuBSONObjectID
@@ -77,7 +87,7 @@ - (NuBSON *) initWithBSON:(bson) b
- (NSData *) data
{
- return [[[NSData alloc] initWithBytes:(bsonValue.data) length:bson_size(&(bsonValue.data))] autorelease];
+ return [[[NSData alloc] initWithBytes:(bsonValue.data) length:bson_size(&(bsonValue))] autorelease];
}
void add_object_to_bson_buffer(bson_buffer *bb, id key, id object)
@@ -273,7 +283,6 @@ void add_bson_to_object(bson_iterator it, id object)
autorelease];
id value = nil;
- char hex_oid[25];
switch(bson_iterator_type(&it)) {
case bson_eoo:
break;
@@ -375,7 +384,7 @@ - (NSMutableDictionary *) dictionaryValue
b = &(bsonObject->bsonValue);
}
else {
- NSLog(@"unable to convert objects of type %@ to BSON (%@).", [object className], object);
+ NSLog(@"unable to convert objects of type %s to BSON (%@).", object_getClassName(object), object);
}
return b;
}
@@ -385,7 +394,7 @@ @implementation NSData (NuBSON)
- (NSMutableDictionary *) BSONValue
{
bson bsonValue;
- bsonValue.data = [self bytes];
+ bsonValue.data = (char *) [self bytes];
bsonValue.owned = NO;
NuBSON *bsonObject = [[[NuBSON alloc] initWithBSON:bsonValue] autorelease];
return [bsonObject dictionaryValue];

0 comments on commit 9ed2396

Please sign in to comment.