objc-gnu2next.h
上传用户:shenzhenrh
上传日期:2013-05-12
资源大小:2904k
文件大小:3k
源码类别:

信息检索与抽取

开发平台:

Unix_Linux

  1. /* Definitions to allow compilation of GNU objc code NeXTSTEP machines
  2.    Copyright (C) 1993 Free Software Foundation, Inc.
  3.    Written by:  R. Andrew McCallum <mccallum@cs.rochester.edu>
  4.    Dept. of Computer Science, U. of Rochester, Rochester, NY  14627
  5.    This file is part of the GNU Objective-C Collection library.
  6.    This library is free software; you can redistribute it and/or
  7.    modify it under the terms of the GNU Library General Public
  8.    License as published by the Free Software Foundation; either
  9.    version 2 of the License, or (at your option) any later version.
  10.    
  11.    This library is distributed in the hope that it will be useful,
  12.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.    Library General Public License for more details.
  15.    You should have received a copy of the GNU Library General Public
  16.    License along with this library; if not, write to the Free
  17.    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. */ 
  19. /* This file is by no means complete. */
  20. #ifndef __objc_gnu2next_h_INCLUDE_GNU
  21. #define __objc_gnu2next_h_INCLUDE_GNU
  22. #ifdef NeXT
  23. #include <objc/objc-class.h>
  24. #define arglist_t marg_list
  25. #define Method_t Method
  26. #define TypedStream NXTypedStream
  27. #define class_pointer isa
  28. #define objc_write_type(STREAM, TYPE, VAR) 
  29.      NXWriteType(STREAM, TYPE, VAR)
  30. #define objc_write_types(STREAM, TYPE, args...) 
  31.      NXWriteTypes(STREAM, TYPE, args)
  32. #define objc_write_object(STREAM, VAR) 
  33.      NXWriteObject(STREAM, VAR)
  34. #define objc_write_object_reference(STREAM, VAR) 
  35.      NXWriteObjectReference(STREAM, VAR)
  36. #define objc_read_type(STREAM, TYPE, VAR) 
  37.      NXReadType(STREAM, TYPE, VAR)
  38. #define objc_read_types(STREAM, TYPE, args...) 
  39.      NXReadTypes(STREAM, TYPE, args)
  40. #define objc_read_object(STREAM, VAR) 
  41.      do { (*(VAR)) = NXReadObject(STREAM); } while (0)
  42. #define objc_write_root_object 
  43.      NXWriteRootObject
  44. #define objc_open_typed_stream_for_file 
  45.     NXOpenTypedStreamForFile
  46. #define objc_close_typed_stream NXCloseTypedStream
  47. #define objc_msg_lookup(OBJ,SEL) 
  48.  [(id)(OBJ) methodFor:(SEL)]
  49. #define class_create_instance(CLASS) class_createInstance(CLASS, 0)
  50. #define sel_get_name(ASEL) sel_getName(ASEL)
  51. #define sel_get_uid(METHODNAME) sel_getUid(METHODNAME)
  52. #define class_get_instance_method(CLASSPOINTER, SEL) 
  53.      class_getInstanceMethod(CLASSPOINTER, SEL)
  54. #define class_get_class_method(CLASSPOINTER, SEL) 
  55.      class_getClassMethod(CLASSPOINTER, SEL)
  56. #define method_get_sizeof_arguments(METHOD) 
  57.      method_getSizeOfArguments(METHOD)
  58. #define objc_lookup_class(NAME) objc_lookUpClass(NAME)
  59. #define CLS_ISCLASS(cls) ((cls)&&CLS_GETINFO(cls, CLS_CLASS))
  60. #define METHOD_NULL NULL
  61. #define OBJC_READONLY 1
  62. #define OBJC_WRITEONLY 2
  63. #endif /* NeXT */
  64. #endif /* __objc_gnu2next_h_INCLUDE_GNU */