1/* 2 * Copyright (c) 2006-2008, The RubyCocoa Project. 3 * Copyright (c) 2001-2006, FUJIMOTO Hisakuni. 4 * All Rights Reserved. 5 * 6 * RubyCocoa is free software, covered under either the Ruby's license or the 7 * LGPL. See the COPYRIGHT file for more information. 8 */ 9 10#import "osx_ruby.h" 11#import <objc/objc.h> 12 13struct _objcid_data { 14 id ocid; 15 BOOL retained; 16 BOOL can_be_released; 17}; 18 19/** class methods **/ 20VALUE objid_s_class (); 21VALUE objcid_new_with_ocid(VALUE klass, id ocid); 22 23/** instance methods 24 * id* objcid_idptr (VALUE rcv); 25 * id objcid_id (VALUE rcv); 26 **/ 27#define OBJCID_DATA_PTR(rcv) ((struct _objcid_data*)(DATA_PTR(rcv))) 28#define OBJCID_ID(rcv) (OBJCID_DATA_PTR(rcv)->ocid) 29#define OBJCID_IDPTR(rcv) (&OBJCID_ID(rcv)) 30 31/** initial loading **/ 32VALUE init_cls_ObjcID (VALUE outer); 33