Skip to content

Commit

Permalink
Updated project settings as suggested by Xcode 5.
Browse files Browse the repository at this point in the history
Changed #include <config.h> to #import “config.h” (using import to include file only once and \“ quotes to search in user header paths).
Updated test.m a bit.
  • Loading branch information
mirek committed Sep 15, 2013
1 parent 238f212 commit d47d2ae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
6 changes: 1 addition & 5 deletions YAML.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0460;
LastUpgradeCheck = 0500;
};
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "YAML" */;
compatibilityVersion = "Xcode 3.2";
Expand Down Expand Up @@ -629,7 +629,6 @@
1DEB91B208733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
Expand All @@ -643,7 +642,6 @@
1DEB91B308733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
Expand All @@ -656,7 +654,6 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
Expand Down Expand Up @@ -686,7 +683,6 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
Expand Down
20 changes: 13 additions & 7 deletions test/test.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
#import <Foundation/Foundation.h>
#import "YAMLSerialization.h"

int main() {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
int
test (int argc, char *argv[]) {
int result = 0;

NSLog(@"reading test file... ");
NSData *data = [NSData dataWithContentsOfFile: @"yaml/basic.yaml"];
NSInputStream *stream = [[NSInputStream alloc] initWithFileAtPath: @"yaml/basic.yaml"];
NSInputStream *stream = [[[NSInputStream alloc] initWithFileAtPath: @"yaml/basic.yaml"] autorelease];
NSLog(@"done.");

NSTimeInterval before = [[NSDate date] timeIntervalSince1970];
Expand All @@ -33,7 +34,6 @@ int main() {
[YAMLSerialization writeObject: yaml toYAMLStream: outStream options: kYAMLWriteOptionMultipleDocuments error: &err];
if (err) {
NSLog(@"Error: %@", err);
[pool release];
return -1;
}
NSLog(@"writeYAML took %f", (float) ([[NSDate date] timeIntervalSince1970] - before3));
Expand All @@ -43,13 +43,19 @@ int main() {
NSData *outData = [YAMLSerialization YAMLDataWithObject: yaml2 options: kYAMLWriteOptionMultipleDocuments error: &err];
if (!outData) {
NSLog(@"Data is nil!");
[pool release];
return -1;
}
NSLog(@"dataFromYAML took %f", ([[NSDate date] timeIntervalSince1970] - before4));
NSLog(@"out data %@", outData);

[pool release];
return result;
}

return 0;
int
main (int argc, char *argv[]) {
int result = 0;
@autoreleasepool {
result = test(argc, argv);
}
return result;
}
2 changes: 1 addition & 1 deletion yaml-0.1.4/src/yaml_private.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#if HAVE_CONFIG_H
#include <config.h>
#import "config.h"
#endif

#include <yaml.h>
Expand Down

0 comments on commit d47d2ae

Please sign in to comment.