diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-15 16:57:05 +0200 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-15 16:57:05 +0200 |
commit | 7ea325733688c78da09d5e0e276803a9f6b3e63d (patch) | |
tree | 2fc1e549dad06e71a234c27465d3ce2cf60536d2 /Objective-C/libobjcl.m | |
parent | 585f55e70e44cccb0807c2bc2d1f0904c8fbc5e1 (diff) |
Make the libffi support code from PyObjC compilable stand-alone.
darcs-hash:f691f757ec2c57915f7b653118183759d8ac590a
Diffstat (limited to 'Objective-C/libobjcl.m')
-rw-r--r-- | Objective-C/libobjcl.m | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Objective-C/libobjcl.m b/Objective-C/libobjcl.m index 3bcdf4b..9d04347 100644 --- a/Objective-C/libobjcl.m +++ b/Objective-C/libobjcl.m @@ -12,11 +12,17 @@ static NSAutoreleasePool *objcl_autorelease_pool = NULL; +/* Preallocate an exception to throw when memory is all used up. */ +NSException *objcl_oom_exception; + void objcl_initialise_runtime (void) { objcl_autorelease_pool = [[NSAutoreleasePool alloc] init]; + objcl_oom_exception = [NSException exceptionWithName: @"MLKOutOfMemoryException" + reason: @"Out of memory" + userInfo: nil]; } @@ -286,7 +292,7 @@ objcl_invoke_with_types (void *receiver, va_start (arglist, argc); for (i = 0; i < argc; i++) { - va_arg (arglist, OBJCL_OBJ_DATA); + va_arg_with_type (arglist, arg_types[i]); } va_end (arglist); } |