Revision: 6599
http://skim-app.svn.sourceforge.net/skim-app/?rev=6599&view=rev
Author: hofman
Date: 2010-06-29 18:54:14 +0000 (Tue, 29 Jun 2010)
Log Message:
-----------
fix searching subdata on Leopard
Modified Paths:
--------------
trunk/NSData_SKExtensions.m
Modified: trunk/NSData_SKExtensions.m
===================================================================
--- trunk/NSData_SKExtensions.m 2010-06-29 18:33:00 UTC (rev 6598)
+++ trunk/NSData_SKExtensions.m 2010-06-29 18:54:14 UTC (rev 6599)
@@ -85,7 +85,7 @@
for (;;) {
if (memcmp(selfPtr, patternBytes, patternLength) == 0)
- return NSMakeRange(selfPtr - selfBufferStart, 0);
+ return NSMakeRange(selfPtr - selfBufferStart, patternLength);
if (anchored)
break;
@@ -331,7 +331,7 @@
+ (void)load {
// this should do nothing on Snow Leopard
- SKAddInstanceMethodImplementationFromSelector(self,
@selector(rangeOfData:options:range:),
@selector(Leopard_rangeOfData:options:range:));
+ SKSetMethodImplementationFromSelector(self,
@selector(rangeOfData:options:range:),
@selector(Leopard_rangeOfData:options:range:), YES, SKAddOrReplace);
}
@end
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit