mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
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:
parent
6b632d32d4
commit
4b027a2106
1 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue