diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-12 15:03:14 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-12 15:03:14 +0200 |
commit | d9a4288c6b7acfbcb7e819841a291f3063daa00c (patch) | |
tree | fdd4d1af1467cf5b11fa5e2166b7fbc67c740ed8 | |
parent | c8b6f78bebeb130e99dd3003bbbb7ad922ffd7ba (diff) |
MLKCompiledClosure: Use intptr_t arguments in order to make compilation easier.
-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]); } |