summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MLKCharacter.m2
-rw-r--r--MLKCons.m1
-rw-r--r--MLKDoubleFloat.m1
-rw-r--r--MLKDynamicContext.m2
-rw-r--r--MLKEndOfFileError.m1
-rw-r--r--MLKEnvironment.m1
-rw-r--r--MLKError.m1
-rw-r--r--MLKFloat.m1
-rw-r--r--MLKInteger.m1
-rw-r--r--MLKLinkedList.m1
-rw-r--r--MLKLowLevelTests.m1
-rw-r--r--MLKPackage.m1
-rw-r--r--MLKParenReader.m1
-rw-r--r--MLKRatio.m1
-rw-r--r--MLKReader.m1
-rw-r--r--MLKReaderError.m1
-rw-r--r--MLKReadtable.m1
-rw-r--r--MLKSingleFloat.m1
-rw-r--r--MLKStream.m1
-rw-r--r--MLKStringInputStream.m1
-rw-r--r--MLKSymbol.m1
-rw-r--r--MLKThrowException.m1
-rw-r--r--MLKUndefinedVariableException.m1
-rw-r--r--runtime-compatibility.h23
24 files changed, 47 insertions, 1 deletions
diff --git a/MLKCharacter.m b/MLKCharacter.m
index c70fd52..13679bd 100644
--- a/MLKCharacter.m
+++ b/MLKCharacter.m
@@ -17,7 +17,7 @@
*/
#import "MLKCharacter.h"
-
+#import "runtime-compatibility.h"
@implementation MLKCharacter
-(MLKCharacter*) initWithUnichar:(unichar)anUnichar
diff --git a/MLKCons.m b/MLKCons.m
index 35a6abc..969060e 100644
--- a/MLKCons.m
+++ b/MLKCons.m
@@ -17,6 +17,7 @@
*/
#import "MLKCons.h"
+#import "runtime-compatibility.h"
#import <Foundation/NSString.h>
diff --git a/MLKDoubleFloat.m b/MLKDoubleFloat.m
index e3cb94d..e066a1a 100644
--- a/MLKDoubleFloat.m
+++ b/MLKDoubleFloat.m
@@ -20,6 +20,7 @@
#import "MLKSingleFloat.h"
#import "MLKDoubleFloat.h"
+#import "runtime-compatibility.h"
#import <Foundation/NSString.h>
diff --git a/MLKDynamicContext.m b/MLKDynamicContext.m
index 92b2384..87a88cc 100644
--- a/MLKDynamicContext.m
+++ b/MLKDynamicContext.m
@@ -18,6 +18,7 @@
#import <Foundation/NSArray.h>
#import <Foundation/NSDictionary.h>
+#import <Foundation/NSException.h>
#import <Foundation/NSNull.h>
#import <Foundation/NSSet.h>
#import <Foundation/NSString.h>
@@ -32,6 +33,7 @@
#import "MLKReadtable.h"
#import "MLKSymbol.h"
#import "MLKInteger.h"
+#import "runtime-compatibility.h"
#define MAKE_ENVIRONMENT(variable, parent, parent_member) \
diff --git a/MLKEndOfFileError.m b/MLKEndOfFileError.m
index 237c2b2..23e60bf 100644
--- a/MLKEndOfFileError.m
+++ b/MLKEndOfFileError.m
@@ -17,6 +17,7 @@
*/
#import "MLKEndOfFileError.h"
+#import "runtime-compatibility.h"
@implementation MLKEndOfFileError
diff --git a/MLKEnvironment.m b/MLKEnvironment.m
index c111bc3..314a46f 100644
--- a/MLKEnvironment.m
+++ b/MLKEnvironment.m
@@ -22,6 +22,7 @@
#import "MLKEnvironment.h"
#import "MLKUndefinedVariableException.h"
+#import "runtime-compatibility.h"
static id UNBOUND;
diff --git a/MLKError.m b/MLKError.m
index 3aad324..6b48aa9 100644
--- a/MLKError.m
+++ b/MLKError.m
@@ -17,6 +17,7 @@
*/
#import "MLKError.h"
+#import "runtime-compatibility.h"
@implementation MLKError
diff --git a/MLKFloat.m b/MLKFloat.m
index 4fc2144..77e824a 100644
--- a/MLKFloat.m
+++ b/MLKFloat.m
@@ -22,6 +22,7 @@
#import "MLKPackage.h"
#import "MLKDynamicContext.h"
#import "MLKError.h"
+#import "runtime-compatibility.h"
@implementation MLKFloat : MLKLispValue
diff --git a/MLKInteger.m b/MLKInteger.m
index 10c3bca..c7ecc48 100644
--- a/MLKInteger.m
+++ b/MLKInteger.m
@@ -17,6 +17,7 @@
*/
#import "MLKInteger.h"
+#import "runtime-compatibility.h"
#import "util.h"
#import <Foundation/NSString.h>
diff --git a/MLKLinkedList.m b/MLKLinkedList.m
index 24e538a..73b6d7d 100644
--- a/MLKLinkedList.m
+++ b/MLKLinkedList.m
@@ -18,6 +18,7 @@
#import "MLKLinkedList.h"
#import "MLKCons.h"
+#import "runtime-compatibility.h"
@implementation MLKLinkedList
diff --git a/MLKLowLevelTests.m b/MLKLowLevelTests.m
index ae04bf3..34d0296 100644
--- a/MLKLowLevelTests.m
+++ b/MLKLowLevelTests.m
@@ -30,6 +30,7 @@
#include "MLKReadtable.h"
#include "MLKSingleFloat.h"
#include "MLKSymbol.h"
+#import "runtime-compatibility.h"
@interface MLKLowLevelTests : NSObject <UKTest>
@end
diff --git a/MLKPackage.m b/MLKPackage.m
index ec74fce..e6d6175 100644
--- a/MLKPackage.m
+++ b/MLKPackage.m
@@ -19,6 +19,7 @@
#import "MLKPackage.h"
#import "MLKSymbol.h"
#import "MLKError.h"
+#import "runtime-compatibility.h"
#import <Foundation/NSDictionary.h>
#import <Foundation/NSSet.h>
diff --git a/MLKParenReader.m b/MLKParenReader.m
index 2470aba..0d3fcc7 100644
--- a/MLKParenReader.m
+++ b/MLKParenReader.m
@@ -25,6 +25,7 @@
#import "MLKReadtable.h"
#import "MLKPackage.h"
#import "MLKStream.h"
+#import "runtime-compatibility.h"
#import <Foundation/NSArray.h>
diff --git a/MLKRatio.m b/MLKRatio.m
index 476af42..4c434c9 100644
--- a/MLKRatio.m
+++ b/MLKRatio.m
@@ -17,6 +17,7 @@
*/
#import "MLKRatio.h"
+#import "runtime-compatibility.h"
#import "util.h"
#import <Foundation/NSString.h>
diff --git a/MLKReader.m b/MLKReader.m
index fd6daa3..1edc651 100644
--- a/MLKReader.m
+++ b/MLKReader.m
@@ -30,6 +30,7 @@
#import "MLKInteger.h"
#import "MLKRatio.h"
#import "MLKStringInputStream.h"
+#import "runtime-compatibility.h"
#import <Foundation/NSArray.h>
#import <Foundation/NSRange.h>
diff --git a/MLKReaderError.m b/MLKReaderError.m
index 0bfe9a1..0d609a7 100644
--- a/MLKReaderError.m
+++ b/MLKReaderError.m
@@ -17,6 +17,7 @@
*/
#import "MLKReaderError.h"
+#import "runtime-compatibility.h"
@implementation MLKReaderError
diff --git a/MLKReadtable.m b/MLKReadtable.m
index 349688e..01e6b38 100644
--- a/MLKReadtable.m
+++ b/MLKReadtable.m
@@ -18,6 +18,7 @@
#import "MLKReadtable.h"
#import "MLKCharacter.h"
+#import "runtime-compatibility.h"
#import <Foundation/NSDictionary.h>
#import <Foundation/NSValue.h>
diff --git a/MLKSingleFloat.m b/MLKSingleFloat.m
index 85cc934..20d92ed 100644
--- a/MLKSingleFloat.m
+++ b/MLKSingleFloat.m
@@ -20,6 +20,7 @@
#import "MLKSingleFloat.h"
#import "MLKDoubleFloat.h"
+#import "runtime-compatibility.h"
#import <Foundation/NSString.h>
diff --git a/MLKStream.m b/MLKStream.m
index 28a2f65..86426e5 100644
--- a/MLKStream.m
+++ b/MLKStream.m
@@ -18,6 +18,7 @@
#import "MLKStream.h"
#import "MLKError.h"
+#import "runtime-compatibility.h"
@implementation MLKStream
diff --git a/MLKStringInputStream.m b/MLKStringInputStream.m
index 97340df..f228869 100644
--- a/MLKStringInputStream.m
+++ b/MLKStringInputStream.m
@@ -17,6 +17,7 @@
*/
#import "MLKStringInputStream.h"
+#import "runtime-compatibility.h"
#import <Foundation/NSString.h>
#import <Foundation/NSStream.h>
diff --git a/MLKSymbol.m b/MLKSymbol.m
index 8a087cf..534debf 100644
--- a/MLKSymbol.m
+++ b/MLKSymbol.m
@@ -17,6 +17,7 @@
*/
#import "MLKSymbol.h"
+#import "runtime-compatibility.h"
#import <Foundation/NSString.h>
diff --git a/MLKThrowException.m b/MLKThrowException.m
index 4931527..c19a3c7 100644
--- a/MLKThrowException.m
+++ b/MLKThrowException.m
@@ -17,6 +17,7 @@
*/
#include "MLKThrowException.h"
+#import "runtime-compatibility.h"
@implementation MLKThrowException
diff --git a/MLKUndefinedVariableException.m b/MLKUndefinedVariableException.m
index ac35322..6e43262 100644
--- a/MLKUndefinedVariableException.m
+++ b/MLKUndefinedVariableException.m
@@ -17,6 +17,7 @@
*/
#import "MLKUndefinedVariableException.h"
+#import "runtime-compatibility.h"
@implementation MLKUndefinedVariableException
diff --git a/runtime-compatibility.h b/runtime-compatibility.h
new file mode 100644
index 0000000..68bc7ed
--- /dev/null
+++ b/runtime-compatibility.h
@@ -0,0 +1,23 @@
+#include <Foundation/NSObject.h>
+
+#ifndef AUTORELEASE
+
+#define ASSIGN(VAR, VALUE) \
+ ({ RELEASE (VAR); VAR = VALUE; RETAIN (VAR); })
+
+#define ASSIGN_COPY(VAR, VALUE) \
+ ({ RELEASE (VAR); VAR = [VALUE copy]; RETAIN (VAR); })
+
+#define AUTORELEASE(VALUE) \
+ [VALUE autorelease]
+
+#define DESTROY(VAR) \
+ ({ RELEASE (VAR); VAR = nil; })
+
+#define RELEASE(VALUE) \
+ [VALUE release]
+
+#define RETAIN(VALUE) \
+ [VALUE retain]
+
+#endif // !AUTORELEASE