summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MobileCydia.mm6
1 files changed, 5 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index ab75fc1..731f6aa 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -882,11 +882,15 @@ class Pcre {
return [NSString stringWithUTF8Bytes:(data_ + matches_[match * 2]) length:(matches_[match * 2 + 1] - matches_[match * 2])];
}
- bool operator ()(NSString *data) {
+ _finline bool operator ()(NSString *data) {
// XXX: length is for characters, not for bytes
return operator ()([data UTF8String], [data length]);
}
+ _finline bool operator ()(const char *data) {
+ return operator ()(data, strlen(data));
+ }
+
bool operator ()(const char *data, size_t size) {
data_ = data;
return pcre_exec(code_, study_, data, size, 0, 0, matches_, (capture_ + 1) * 3) >= 0;