diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-06-18 14:03:02 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-06-18 14:03:02 +0000 |
commit | c040e154bc58fac262324a0c40ef5572d5ef28c8 (patch) | |
tree | 700162d14e8f27601c21eb3014f67e8df2a20b06 /Source/CMTextView.m | |
parent | 189886df88e04296555743b15ba31d2fee887e22 (diff) | |
download | sequelpro-c040e154bc58fac262324a0c40ef5572d5ef28c8.tar.gz sequelpro-c040e154bc58fac262324a0c40ef5572d5ef28c8.tar.bz2 sequelpro-c040e154bc58fac262324a0c40ef5572d5ef28c8.zip |
• introduced inline function NSStringUTF8String() to SPStringAdditions.h
- NSData *d = [aStr UTF8String]; :== NSData *d = NSStrignUTF8String(aStr) but a tick faster
• implemented NSStringUTF8String() in queryString: and for the lex parser (syntax highlighting)
Diffstat (limited to 'Source/CMTextView.m')
-rw-r--r-- | Source/CMTextView.m | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/CMTextView.m b/Source/CMTextView.m index 142663bd..8e891b20 100644 --- a/Source/CMTextView.m +++ b/Source/CMTextView.m @@ -2185,7 +2185,8 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) //initialise flex yyuoffset = textRange.location; yyuleng = 0; - yy_switch_to_buffer(yy_scan_string([[[self string] substringWithRange:textRange] UTF8String])); + // yy_switch_to_buffer(yy_scan_string([[[self string] substringWithRange:textRange] UTF8String])); + yy_switch_to_buffer(yy_scan_string(NSStringUTF8String([[self string] substringWithRange:textRange]))); //now loop through all the tokens while (token=yylex()){ |