diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-01-28 19:17:00 +0100 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-01-28 19:17:00 +0100 |
commit | 7cea2578637b823e93798e308ab0811c7fd7b7a4 (patch) | |
tree | 0db0eb3e9065528052ef618059ec7da91a44418a /Objective-C/PyObjC/pyobjc.h | |
parent | b44ee368288b98ed5125ccb214e6d665c134be1f (diff) |
Directory layout: Put code imported from PyObjC into its own directory.
darcs-hash:e3dd1138105e4eece0fbcbc13365eb3a25ffb808
Diffstat (limited to 'Objective-C/PyObjC/pyobjc.h')
-rw-r--r-- | Objective-C/PyObjC/pyobjc.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Objective-C/PyObjC/pyobjc.h b/Objective-C/PyObjC/pyobjc.h new file mode 100644 index 0000000..6a2d6b4 --- /dev/null +++ b/Objective-C/PyObjC/pyobjc.h @@ -0,0 +1,46 @@ +/* Copyright 2007, Matthias Andreas Benkard. */ + +#ifndef __pyobjc_H +#define __pyobjc_H + +#include <stdlib.h> +#include <stdio.h> +#include "libobjcl.h" + + +#ifdef __NEXT_RUNTIME__ + +#ifndef APPLE_RUNTIME +#define APPLE_RUNTIME +#endif + +#import <objc/objc-class.h> + +#else /* !__NEXT_RUNTIME__ */ + +#ifndef GNU_RUNTIME +#define GNU_RUNTIME +#endif + +#import <objc/objc-api.h> +#ifndef __CXX__ +#define bool BOOL +#endif + +#endif /* __NEXT_RUNTIME__ */ + + +#define PyMem_Free free +#define PyMem_Malloc malloc +#define Py_ssize_t ssize_t + +#ifdef OOM_KILL +#define PyErr_NoMemory() [objcl_oom_exception raise] +#else +#define PyErr_NoMemory() NSLog (@"ERROR: Memory exhausted."); +#endif + +#include "objc_support.h" +#include "libffi_support.h" + +#endif /* __pyobjc_H */ |