diff options
-rw-r--r-- | MLKCompiledClosure.h | 6 | ||||
-rw-r--r-- | MLKCompiledClosure.m | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/MLKCompiledClosure.h b/MLKCompiledClosure.h index 53267b2..589c0de 100644 --- a/MLKCompiledClosure.h +++ b/MLKCompiledClosure.h @@ -32,13 +32,15 @@ BOOL _ownPointer; // do we own the _code pointer cell? } +// Why intptr_t? Because it makes it easier to call this method from +// LLVM-generated code without proper type handling. -(id) initWithCode:(void *)code data:(id *)data - length:(int)dataLength; + length:(intptr_t)dataLength; +(id) closureWithCode:(void *)code data:(id *)data - length:(int)dataLength;; + length:(intptr_t)dataLength;; -(NSArray *) applyToArray:(NSArray *)arguments; diff --git a/MLKCompiledClosure.m b/MLKCompiledClosure.m index b70fa03..5dbf6dd 100644 --- a/MLKCompiledClosure.m +++ b/MLKCompiledClosure.m @@ -32,7 +32,7 @@ @implementation MLKCompiledClosure -(id) initWithCode:(void *)code data:(id *)data - length:(int)dataLength + length:(intptr_t)dataLength { int i; @@ -53,7 +53,7 @@ +(id) closureWithCode:(void *)code data:(id *)data - length:(int)dataLength + length:(intptr_t)dataLength { return LAUTORELEASE ([[self alloc] initWithCode:code data:data length:dataLength]); } |