summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-02-27 14:18:34 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-07 02:41:26 -0800
commit3894bd28cb68484b6105a16823901c00433fe4ce (patch)
tree0cb9c4ca12917f2988f13758ed5122f3d135d411 /MobileCydia.mm
parent8ea598c0a2b2987291ae03132a5e7d63c9473b54 (diff)
Clarify Pcre operator () helpers.
Diffstat (limited to 'MobileCydia.mm')
-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;