Stub for NSRegularExpression when a compatible version of ICU is not present.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33602 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Chisnall 2011-07-22 13:23:11 +00:00
parent 6b632d32d4
commit 4b027a2106

View file

@ -28,6 +28,8 @@
#include "unicode/uregex.h"
#if (U_ICU_VERSION_MAJOR_NUM > 4 || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >= 4))
#define NSRegularExpressionWorks
#define GSREGEXTYPE URegularExpression
#import "GSICUString.h"
#import "Foundation/NSRegularExpression.h"
@ -622,3 +624,13 @@ prepareResult(NSRegularExpression *regex,
@end
#endif //U_ICU_VERSION_MAJOR_NUM > 4 || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >= 4))
#endif //HAV_ICU
#ifndef NSRegularExpressionWorks
@implementation NSRegularExpression
+ (id)allocWithZone: (NSZone*)
{
[NSException raise: NSInvalidArgumentException
format: @"NSRegularExpression requires ICU 4.4 or later"];
}
@end
#endif