home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / c / objam01.lha / objam / objc / objc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-11  |  799 b   |  56 lines

  1. /*
  2. ** ObjectiveAmiga: Include basic Objective C headers
  3. ** See GNU:lib/libobjam/ReadMe for details
  4. */
  5.  
  6.  
  7. #ifndef __objc_INCLUDE_GNU
  8. #define __objc_INCLUDE_GNU
  9.  
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13.  
  14. #include <stddef.h>
  15. #include <libraries/objc.h>
  16. #include <proto/objc.h>
  17.  
  18.  
  19. /* Global variables */
  20.  
  21. #ifndef NOLIBNIX
  22.  
  23. extern int __argv;
  24. extern char **__argc;
  25.  
  26. #define NXArgc __argc;
  27. #define NXArgv __argv;
  28.  
  29. #endif
  30.  
  31.  
  32. /* Inlined messager */
  33.  
  34. #if defined(__OBJC__)
  35.  
  36. extern id nil_method(id rcv, SEL op, ...);
  37.  
  38. extern __inline__ IMP objc_msg_lookup(id receiver, SEL op)
  39. {
  40.   if(receiver) return sarray_get(receiver->class_pointer->dtable, (size_t)(op));
  41.   else return nil_method;
  42. }
  43.  
  44. #else
  45.  
  46. IMP objc_msg_lookup(id receiver, SEL op);
  47.  
  48. #endif
  49.  
  50.  
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54.  
  55. #endif /* not __objc_INCLUDE_GNU */
  56.