Commits

Tuukka Norri committed b95f30e

Small changes
- Added a prefix to regular_expression_st since it's now defined in a header.
- Added a condition around NSBlockExpressionType because it isn't defined in our current SDK.

Comments (0)

Files changed (4)

Sources/BXRegularExpressions.h

 #import <BaseTen/BXExport.h>
 
 
-struct regular_expression_st 
+struct bx_regular_expression_st 
 {
 	pcre* re_expression;
 	pcre_extra* re_extra;
 };
 
 
-BX_EXPORT void BXRegularExpressionCompile (struct regular_expression_st *re, const char *pattern);
-BX_EXPORT void BXRegularExpressionFree (struct regular_expression_st *re);
+BX_EXPORT void BXRegularExpressionCompile (struct bx_regular_expression_st *re, const char *pattern);
+BX_EXPORT void BXRegularExpressionFree (struct bx_regular_expression_st *re);

Sources/BXRegularExpressions.m

 
 
 void
-BXRegularExpressionCompile (struct regular_expression_st *re, const char *pattern)
+BXRegularExpressionCompile (struct bx_regular_expression_st *re, const char *pattern)
 {
 	const int options = PCRE_UTF8 | PCRE_MULTILINE | PCRE_DOLLAR_ENDONLY;
 	const char* error = NULL;
 
 
 void
-BXRegularExpressionFree (struct regular_expression_st *re)
+BXRegularExpressionFree (struct bx_regular_expression_st *re)
 {
 	if (re)
 	{

Sources/NSExpression+PGTSAdditions.m

 			retval = [visitor visitMinusSetExpression: self];
 			break;
 			
+#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_10_6 <= MAC_OS_X_VERSION_MAX_ALLOWED
 		case NSBlockExpressionType:
 			retval = [visitor visitBlockExpression: self];
 			break;
-			
+#endif
+
 		default:
 			retval = [visitor visitUnknownExpression: self];
 			break;

Sources/PGTSDates.m

 #define kOvectorSize 64
 
 
-static struct regular_expression_st gTimestampExp = {};
-static struct regular_expression_st gDateExp = {};
-static struct regular_expression_st gTimeExp = {};
+static struct bx_regular_expression_st gTimestampExp = {};
+static struct bx_regular_expression_st gDateExp = {};
+static struct bx_regular_expression_st gTimeExp = {};
 
 __strong static NSDateComponents* gDefaultComponents = nil;
 __strong static NSTimeZone* gDefaultTimeZone = nil;
 
 
 static NSDate*
-CopyDate (struct regular_expression_st* re, const char* subject, int* ovector, int status)
+CopyDate (struct bx_regular_expression_st *re, const char *subject, int *ovector, int status)
 {
 	NSDate* retval = nil;
 	char buffer [16] = {};