Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility issues with iOS 8/Xcode 6 #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions framework/CocoaOniguruma.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
285A5408199C318B00932DDE /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 285A5407199C318B00932DDE /* SenTestingKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
7807AC380E2FBB8600A5AB6A /* OnigRegexp.h in Headers */ = {isa = PBXBuildFile; fileRef = 7807AC1A0E2FBB8600A5AB6A /* OnigRegexp.h */; settings = {ATTRIBUTES = (Public, ); }; };
7807AC390E2FBB8600A5AB6A /* OnigRegexp.m in Sources */ = {isa = PBXBuildFile; fileRef = 7807AC1B0E2FBB8600A5AB6A /* OnigRegexp.m */; };
7807AC3A0E2FBB8600A5AB6A /* OnigRegexpUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = 7807AC1C0E2FBB8600A5AB6A /* OnigRegexpUtility.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand All @@ -32,7 +33,6 @@
7807AC520E2FBB8600A5AB6A /* st.h in Headers */ = {isa = PBXBuildFile; fileRef = 7807AC360E2FBB8600A5AB6A /* st.h */; };
78C5E1CD0E39CE5F00F62F5D /* OnigRegexpTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 78C5E1B70E39CDEE00F62F5D /* OnigRegexpTest.m */; };
78C5E21F0E39CF7300F62F5D /* CocoaOniguruma.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* CocoaOniguruma.framework */; };
78C5E2310E39CFEA00F62F5D /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C5E2300E39CFEA00F62F5D /* SenTestingKit.framework */; };
78C5E26C0E39D0BD00F62F5D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C5E26B0E39D0BD00F62F5D /* Foundation.framework */; };
78C5E3B10E39E38C00F62F5D /* CocoaOniguruma.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* CocoaOniguruma.framework */; };
78C5E3D00E39E42000F62F5D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 78C5E3C00E39E3D900F62F5D /* main.m */; };
Expand All @@ -59,6 +59,7 @@

/* Begin PBXFileReference section */
089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
285A5407199C318B00932DDE /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
32DBCF5E0370ADEE00C91783 /* CocoaOniguruma_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocoaOniguruma_Prefix.pch; sourceTree = "<group>"; };
7807AC1A0E2FBB8600A5AB6A /* OnigRegexp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OnigRegexp.h; sourceTree = "<group>"; };
7807AC1B0E2FBB8600A5AB6A /* OnigRegexp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OnigRegexp.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -100,8 +101,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
285A5408199C318B00932DDE /* SenTestingKit.framework in Frameworks */,
78C5E21F0E39CF7300F62F5D /* CocoaOniguruma.framework in Frameworks */,
78C5E2310E39CFEA00F62F5D /* SenTestingKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -150,6 +151,7 @@
0867D69AFE84028FC02AAC07 /* Frameworks */ = {
isa = PBXGroup;
children = (
285A5407199C318B00932DDE /* SenTestingKit.framework */,
78C5E26B0E39D0BD00F62F5D /* Foundation.framework */,
78C5E2300E39CFEA00F62F5D /* SenTestingKit.framework */,
);
Expand Down Expand Up @@ -329,7 +331,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastTestingUpgradeCheck = 0510;
LastTestingUpgradeCheck = 0600;
LastUpgradeCheck = 0510;
};
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "CocoaOniguruma" */;
Expand Down Expand Up @@ -520,7 +522,10 @@
ALWAYS_SEARCH_USER_PATHS = NO;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
Expand All @@ -543,7 +548,10 @@
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h";
Expand Down
2 changes: 1 addition & 1 deletion framework/core/OnigRegexp.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ typedef enum {

@interface OnigRegexp : NSObject
{
regex_t* _entity;
onig_regex_t* _entity;
NSString* _expression;
}

Expand Down
6 changes: 3 additions & 3 deletions framework/core/OnigRegexp.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static int captureNameCallback(const OnigUChar* name, const OnigUChar* end, int

@implementation OnigRegexp

- (id)initWithEntity:(regex_t*)entity expression:(NSString*)expression
- (id)initWithEntity:(onig_regex_t*)entity expression:(NSString*)expression
{
self = [super init];
if (self) {
Expand Down Expand Up @@ -117,7 +117,7 @@ + (OnigRegexp*)compile:(NSString*)expression options:(OnigOption)theOptions erro
OnigOptionType option = theOptions;

OnigErrorInfo err;
regex_t* entity = 0;
onig_regex_t* entity = 0;
const UChar* str = (const UChar*)[expression cStringUsingEncoding:STRING_ENCODING];

int status;
Expand Down Expand Up @@ -240,7 +240,7 @@ - (NSString*)expression
return _expression;
}

- (regex_t*)entity
- (onig_regex_t*)entity
{
return _entity;
}
Expand Down
8 changes: 4 additions & 4 deletions framework/core/oniguruma/oniguruma.h
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ extern void onig_null_warn P_((const char* s));

#define ONIG_CHAR_TABLE_SIZE 256

/* regex_t state */
/* onig_regex_t state */
#define ONIG_STATE_NORMAL 0
#define ONIG_STATE_SEARCHING 1
#define ONIG_STATE_COMPILING -1
Expand Down Expand Up @@ -636,14 +636,14 @@ typedef struct re_pattern_buffer {
OnigDistance dmin; /* min-distance of exact or map */
OnigDistance dmax; /* max-distance of exact or map */

/* regex_t link chain */
/* onig_regex_t link chain */
struct re_pattern_buffer* chain; /* escape compile-conflict */
} OnigRegexType;

typedef OnigRegexType* OnigRegex;

#ifndef ONIG_ESCAPE_REGEX_T_COLLISION
typedef OnigRegexType regex_t;
typedef OnigRegexType onig_regex_t;
#endif


Expand All @@ -668,7 +668,7 @@ void onig_set_verb_warn_func P_((OnigWarnFunc f));
ONIG_EXTERN
int onig_new P_((OnigRegex*, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
ONIG_EXTERN
int onig_reg_init P_((regex_t* reg, OnigOptionType option, OnigCaseFoldType case_fold_flag, OnigEncoding enc, OnigSyntaxType* syntax));
int onig_reg_init P_((onig_regex_t* reg, OnigOptionType option, OnigCaseFoldType case_fold_flag, OnigEncoding enc, OnigSyntaxType* syntax));
int onig_new_without_alloc P_((OnigRegex, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
ONIG_EXTERN
int onig_new_deluxe P_((OnigRegex* reg, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo));
Expand Down
Loading