Revision: 4330 http://trac.macosforge.org/projects/ruby/changeset/4330 Author: martinlagardette@apple.com Date: 2010-07-07 20:07:31 -0700 (Wed, 07 Jul 2010) Log Message: ----------- Move Obj-C related headers around. Snything that is Obj-C related is now in a separate header. This will avoid "true" to already be defined for example. - Fixes <rdar://problem/7871199> - Fixes #728 Modified Paths: -------------- MacRuby/trunk/MacRuby.m MacRuby/trunk/NSArray.m MacRuby/trunk/NSDictionary.m MacRuby/trunk/NSString.m MacRuby/trunk/array.c MacRuby/trunk/bignum.c MacRuby/trunk/bridgesupport.cpp MacRuby/trunk/class.c MacRuby/trunk/compar.c MacRuby/trunk/compiler.cpp MacRuby/trunk/complex.c MacRuby/trunk/cont.c MacRuby/trunk/debugger.cpp MacRuby/trunk/dir.c MacRuby/trunk/dispatcher.cpp MacRuby/trunk/dln.c MacRuby/trunk/encoding.c MacRuby/trunk/enum.c MacRuby/trunk/enumerator.c MacRuby/trunk/env.c MacRuby/trunk/error.c MacRuby/trunk/eval.c MacRuby/trunk/ext/bigdecimal/bigdecimal.c MacRuby/trunk/ext/digest/bubblebabble/bubblebabble.c MacRuby/trunk/ext/digest/digest.h MacRuby/trunk/ext/etc/etc.c MacRuby/trunk/ext/json/rubyext.c MacRuby/trunk/ext/libyaml/rubyext.c MacRuby/trunk/ext/nkf/nkf.c MacRuby/trunk/ext/openssl/ossl.h MacRuby/trunk/ext/readline/readline.c MacRuby/trunk/ext/socket/socket.c MacRuby/trunk/ext/zlib/zlib.c MacRuby/trunk/file.c MacRuby/trunk/gc.c MacRuby/trunk/gcd.c MacRuby/trunk/hash.c MacRuby/trunk/id.c MacRuby/trunk/include/ruby/intern.h MacRuby/trunk/include/ruby/ruby.h MacRuby/trunk/inits.c MacRuby/trunk/interpreter.cpp MacRuby/trunk/io.c MacRuby/trunk/kernel.c MacRuby/trunk/load.c MacRuby/trunk/main.cpp MacRuby/trunk/marshal.c MacRuby/trunk/math.c MacRuby/trunk/numeric.c MacRuby/trunk/objc.m MacRuby/trunk/object.c MacRuby/trunk/pack.c MacRuby/trunk/parse.y MacRuby/trunk/prec.c MacRuby/trunk/proc.c MacRuby/trunk/process.c MacRuby/trunk/random.c MacRuby/trunk/range.c MacRuby/trunk/rational.c MacRuby/trunk/re.cpp MacRuby/trunk/ruby.c MacRuby/trunk/signal.c MacRuby/trunk/sprintf.c MacRuby/trunk/st.c MacRuby/trunk/string.c MacRuby/trunk/struct.c MacRuby/trunk/symbol.c MacRuby/trunk/thread.c MacRuby/trunk/time.c MacRuby/trunk/transcode.c MacRuby/trunk/ucnv.c MacRuby/trunk/util.c MacRuby/trunk/variable.c MacRuby/trunk/version.c MacRuby/trunk/vm.cpp MacRuby/trunk/vm_eval.c MacRuby/trunk/vm_method.c Added Paths: ----------- MacRuby/trunk/include/ruby/macruby.h Modified: MacRuby/trunk/MacRuby.m =================================================================== --- MacRuby/trunk/MacRuby.m 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/MacRuby.m 2010-07-08 03:07:31 UTC (rev 4330) @@ -8,7 +8,7 @@ #import <Foundation/Foundation.h> -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "ruby/objc.h" #include "vm.h" Modified: MacRuby/trunk/NSArray.m =================================================================== --- MacRuby/trunk/NSArray.m 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/NSArray.m 2010-07-08 03:07:31 UTC (rev 4330) @@ -8,7 +8,7 @@ #import <Foundation/Foundation.h> -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "objc.h" #include "vm.h" Modified: MacRuby/trunk/NSDictionary.m =================================================================== --- MacRuby/trunk/NSDictionary.m 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/NSDictionary.m 2010-07-08 03:07:31 UTC (rev 4330) @@ -8,7 +8,7 @@ #import <Foundation/Foundation.h> -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "objc.h" #include "vm.h" Modified: MacRuby/trunk/NSString.m =================================================================== --- MacRuby/trunk/NSString.m 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/NSString.m 2010-07-08 03:07:31 UTC (rev 4330) @@ -8,7 +8,7 @@ #import <Foundation/Foundation.h> -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "objc.h" #include "vm.h" Modified: MacRuby/trunk/array.c =================================================================== --- MacRuby/trunk/array.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/array.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ * Copyright (C) 2000 Information-technology Promotion Agency, Japan */ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/util.h" #include "ruby/st.h" #include "id.h" Modified: MacRuby/trunk/bignum.c =================================================================== --- MacRuby/trunk/bignum.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/bignum.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "objc.h" Modified: MacRuby/trunk/bridgesupport.cpp =================================================================== --- MacRuby/trunk/bridgesupport.cpp 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/bridgesupport.cpp 2010-07-08 03:07:31 UTC (rev 4330) @@ -24,7 +24,7 @@ using namespace llvm; #endif -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "vm.h" #include "compiler.h" Modified: MacRuby/trunk/class.c =================================================================== --- MacRuby/trunk/class.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/class.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ * Copyright (C) 2000 Information-technology Promotion Agency, Japan */ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/signal.h" #include "ruby/node.h" #include "ruby/st.h" Modified: MacRuby/trunk/compar.c =================================================================== --- MacRuby/trunk/compar.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/compar.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "vm.h" Modified: MacRuby/trunk/compiler.cpp =================================================================== --- MacRuby/trunk/compiler.cpp 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/compiler.cpp 2010-07-08 03:07:31 UTC (rev 4330) @@ -18,7 +18,7 @@ #include <llvm/Transforms/Utils/Cloning.h> #include "llvm.h" -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/encoding.h" #include "ruby/node.h" #include "id.h" Modified: MacRuby/trunk/complex.c =================================================================== --- MacRuby/trunk/complex.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/complex.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -5,7 +5,7 @@ which is written in ruby. */ -#include "ruby.h" +#include "ruby/macruby.h" #include <math.h> #include "ruby/node.h" #include "vm.h" Modified: MacRuby/trunk/cont.c =================================================================== --- MacRuby/trunk/cont.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/cont.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" enum context_type { CONTINUATION_CONTEXT = 0, Modified: MacRuby/trunk/debugger.cpp =================================================================== --- MacRuby/trunk/debugger.cpp 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/debugger.cpp 2010-07-08 03:07:31 UTC (rev 4330) @@ -24,7 +24,7 @@ #include <sys/socket.h> #include <sys/un.h> -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "vm.h" #include "compiler.h" Modified: MacRuby/trunk/dir.c =================================================================== --- MacRuby/trunk/dir.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/dir.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -11,7 +11,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "ruby/util.h" #include "vm.h" Modified: MacRuby/trunk/dispatcher.cpp =================================================================== --- MacRuby/trunk/dispatcher.cpp 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/dispatcher.cpp 2010-07-08 03:07:31 UTC (rev 4330) @@ -7,7 +7,7 @@ */ #include "llvm.h" -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "id.h" #include "vm.h" @@ -16,6 +16,8 @@ #include "dtrace.h" #include "class.h" + + #include <execinfo.h> #include <dlfcn.h> Modified: MacRuby/trunk/dln.c =================================================================== --- MacRuby/trunk/dln.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/dln.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "dln.h" #include <stdlib.h> #include <alloca.h> Modified: MacRuby/trunk/encoding.c =================================================================== --- MacRuby/trunk/encoding.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/encoding.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -11,7 +11,7 @@ #include <string.h> -#include "ruby.h" +#include "ruby/macruby.h" #include "ruby/encoding.h" #include "encoding.h" Modified: MacRuby/trunk/enum.c =================================================================== --- MacRuby/trunk/enum.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/enum.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "ruby/util.h" #include "vm.h" Modified: MacRuby/trunk/enumerator.c =================================================================== --- MacRuby/trunk/enumerator.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/enumerator.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -12,7 +12,7 @@ ************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "id.h" /* Modified: MacRuby/trunk/env.c =================================================================== --- MacRuby/trunk/env.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/env.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ * Copyright (C) 2000 Information-technology Promotion Agency, Japan */ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/st.h" #include "ruby/util.h" #include "ruby/node.h" Modified: MacRuby/trunk/error.c =================================================================== --- MacRuby/trunk/error.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/error.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/st.h" #include "ruby/node.h" #include "vm.h" Modified: MacRuby/trunk/eval.c =================================================================== --- MacRuby/trunk/eval.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/eval.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ * Copyright (C) 2000 Information-technology Promotion Agency, Japan */ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "vm.h" #include "dtrace.h" Modified: MacRuby/trunk/ext/bigdecimal/bigdecimal.c =================================================================== --- MacRuby/trunk/ext/bigdecimal/bigdecimal.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/ext/bigdecimal/bigdecimal.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -13,7 +13,7 @@ * */ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include <ctype.h> #include <stdio.h> #include <stdlib.h> Modified: MacRuby/trunk/ext/digest/bubblebabble/bubblebabble.c =================================================================== --- MacRuby/trunk/ext/digest/bubblebabble/bubblebabble.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/ext/digest/bubblebabble/bubblebabble.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -11,7 +11,7 @@ ************************************************/ -#include "ruby.h" +#include "ruby/macruby.h" #include "digest.h" static ID id_digest; Modified: MacRuby/trunk/ext/digest/digest.h =================================================================== --- MacRuby/trunk/ext/digest/digest.h 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/ext/digest/digest.h 2010-07-08 03:07:31 UTC (rev 4330) @@ -13,7 +13,7 @@ ************************************************/ -#include "ruby.h" +#include "ruby/macruby.h" #define RUBY_DIGEST_API_VERSION 2 Modified: MacRuby/trunk/ext/etc/etc.c =================================================================== --- MacRuby/trunk/ext/etc/etc.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/ext/etc/etc.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -7,7 +7,7 @@ ************************************************/ -#include "ruby.h" +#include "ruby/macruby.h" #include <sys/types.h> #ifdef HAVE_UNISTD_H Modified: MacRuby/trunk/ext/json/rubyext.c =================================================================== --- MacRuby/trunk/ext/json/rubyext.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/ext/json/rubyext.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -8,7 +8,7 @@ * */ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/intern.h" #include "ruby/node.h" #include "ruby/io.h" Modified: MacRuby/trunk/ext/libyaml/rubyext.c =================================================================== --- MacRuby/trunk/ext/libyaml/rubyext.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/ext/libyaml/rubyext.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -6,7 +6,7 @@ * Copyright (C) 2009-2010, Apple Inc. All rights reserved. */ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/intern.h" #include "ruby/node.h" #include "ruby/io.h" Modified: MacRuby/trunk/ext/nkf/nkf.c =================================================================== --- MacRuby/trunk/ext/nkf/nkf.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/ext/nkf/nkf.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -10,7 +10,7 @@ #define RUBY_NKF_REVISION "$Revision: 16493 $" #define RUBY_NKF_VERSION NKF_VERSION " (" NKF_RELEASE_DATE ")" -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/encoding.h" /* Replace nkf's getchar/putchar for variable modification */ Modified: MacRuby/trunk/ext/openssl/ossl.h =================================================================== --- MacRuby/trunk/ext/openssl/ossl.h 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/ext/openssl/ossl.h 2010-07-08 03:07:31 UTC (rev 4330) @@ -28,7 +28,7 @@ #if defined(RFILE) /*&& !defined(OSSL_DEBUG)*/ # undef RFILE #endif -#include <ruby.h> +#include <ruby/macruby.h> #include <ruby/io.h> /* Modified: MacRuby/trunk/ext/readline/readline.c =================================================================== --- MacRuby/trunk/ext/readline/readline.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/ext/readline/readline.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -33,7 +33,7 @@ #include <editline/readline.h> #endif -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/io.h" #ifdef HAVE_UNISTD_H Modified: MacRuby/trunk/ext/socket/socket.c =================================================================== --- MacRuby/trunk/ext/socket/socket.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/ext/socket/socket.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ ************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/io.h" #include "ruby/signal.h" #include "ruby/util.h" Modified: MacRuby/trunk/ext/zlib/zlib.c =================================================================== --- MacRuby/trunk/ext/zlib/zlib.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/ext/zlib/zlib.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -7,7 +7,7 @@ * Copyright (C) UENO Katsuhiro 2000-2003 */ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/intern.h" #include "ruby/node.h" #include "ruby/io.h" Modified: MacRuby/trunk/file.c =================================================================== --- MacRuby/trunk/file.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/file.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -11,7 +11,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/io.h" #include "ruby/signal.h" #include "ruby/util.h" Modified: MacRuby/trunk/gc.c =================================================================== --- MacRuby/trunk/gc.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/gc.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -17,7 +17,7 @@ # include "auto_zone_1060.h" #endif -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/signal.h" #include "ruby/st.h" #include "ruby/node.h" Modified: MacRuby/trunk/gcd.c =================================================================== --- MacRuby/trunk/gcd.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/gcd.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -6,7 +6,7 @@ * Copyright (C) 2009-2010, Apple Inc. All rights reserved. */ -#include "ruby.h" +#include "ruby/macruby.h" #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 Modified: MacRuby/trunk/hash.c =================================================================== --- MacRuby/trunk/hash.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/hash.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ * Copyright (C) 2000 Information-technology Promotion Agency, Japan */ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/st.h" #include "ruby/util.h" #include "ruby/signal.h" Modified: MacRuby/trunk/id.c =================================================================== --- MacRuby/trunk/id.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/id.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "vm.h" Modified: MacRuby/trunk/include/ruby/intern.h =================================================================== --- MacRuby/trunk/include/ruby/intern.h 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/include/ruby/intern.h 2010-07-08 03:07:31 UTC (rev 4330) @@ -74,12 +74,6 @@ VALUE rb_get_values_at(VALUE, long, int, VALUE*, VALUE(*)(VALUE,long)); void rb_ary_insert(VALUE, long, VALUE); VALUE rb_ary_equal(VALUE, VALUE); -#if WITH_OBJC -long rb_ary_len(VALUE); -VALUE rb_ary_elt(VALUE, long); -VALUE rb_ary_aref(VALUE ary, SEL sel, int argc, VALUE *argv); -bool rb_objc_ary_is_pure(VALUE); -#endif /* bignum.c */ VALUE rb_big_clone(VALUE); void rb_big_2comp(VALUE); @@ -142,13 +136,6 @@ #define rb_Complex1(x) rb_Complex(x, INT2FIX(0)) #define rb_Complex2(x,y) rb_Complex(x, y) /* class.c */ -#if WITH_OBJC -VALUE rb_objc_create_class(const char *name, VALUE super); -void rb_objc_class_sync_version(Class klass, Class super_class); -void rb_define_object_special_methods(VALUE klass); -VALUE rb_class_new_instance_imp(VALUE, SEL, int, VALUE *); -VALUE rb_make_singleton_class(VALUE super); -#endif VALUE rb_class_boot(VALUE); VALUE rb_class_new(VALUE); //VALUE rb_mod_init_copy(VALUE, VALUE); @@ -188,14 +175,7 @@ VALUE rb_fiber_current(void); VALUE rb_fiber_alive_p(VALUE); /* enum.c */ -/* enumerator.c */ -VALUE rb_enumeratorize(VALUE, SEL, int, VALUE *); -#define RETURN_ENUMERATOR(obj, argc, argv) do { \ - if (!rb_block_given_p()) \ - return rb_enumeratorize((VALUE)obj, sel, argc, argv); \ - } while (0) /* error.c */ -VALUE rb_f_notimplement(VALUE rcv, SEL sel); VALUE rb_exc_new(VALUE, const char*, long); VALUE rb_exc_new2(VALUE, const char*); VALUE rb_exc_new3(VALUE, VALUE); @@ -261,8 +241,8 @@ void rb_alias(VALUE, ID, ID); void rb_attr(VALUE,ID,int,int,int); VALUE rb_eval_cmd(VALUE, VALUE, int); -bool rb_obj_respond_to(VALUE, ID, bool); -bool rb_respond_to(VALUE, ID); +int rb_obj_respond_to(VALUE, ID, int); +int rb_respond_to(VALUE, ID); void rb_interrupt(void); VALUE rb_apply(VALUE, ID, VALUE); void rb_backtrace(void); @@ -280,7 +260,6 @@ VALUE rb_proc_call2(VALUE self, int argc, VALUE *argv); int rb_proc_arity(VALUE); VALUE rb_binding_new(void); -VALUE rb_method_call(VALUE, SEL, int, VALUE*); VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*); void rb_mark_end_proc(void); void rb_exec_end_proc(void); @@ -317,32 +296,11 @@ VALUE rb_find_file(VALUE); #define rb_path_skip_prefix(path) (path) char *rb_path_end(const char *); -VALUE rb_file_directory_p(VALUE,SEL,VALUE); /* gc.c */ -VALUE rb_obj_id(VALUE obj, SEL sel); void ruby_set_stack_size(size_t); NORETURN(void rb_memerror(void)); int ruby_stack_check(void); int ruby_stack_length(VALUE**); -#if WITH_OBJC -void rb_objc_gc_register_thread(void); -void rb_objc_gc_unregister_thread(void); -void rb_objc_set_associative_ref(void *, void *, void *); -void *rb_objc_get_associative_ref(void *, void *); -# define rb_gc_mark_locations(x,y) -# define rb_mark_tbl(x) -# define rb_mark_set(x) -# define rb_mark_hash(x) -# define rb_gc_mark_maybe(x) -# define rb_gc_mark(x) -#else -void rb_gc_mark_locations(VALUE*, VALUE*); -void rb_mark_tbl(struct st_table*); -void rb_mark_set(struct st_table*); -void rb_mark_hash(struct st_table*); -void rb_gc_mark_maybe(VALUE); -void rb_gc_mark(VALUE); -#endif void rb_gc_force_recycle(VALUE); void rb_gc(void); void rb_gc_copy_finalizer(VALUE,VALUE); @@ -374,9 +332,6 @@ int rb_path_check(const char*); int rb_env_path_tainted(void); VALUE rb_env_clear(void); -#if WITH_OBJC -bool rb_objc_hash_is_pure(VALUE); -#endif /* io.c */ #define rb_defout rb_stdout RUBY_EXTERN VALUE rb_fs; @@ -385,16 +340,7 @@ RUBY_EXTERN VALUE rb_default_rs; RUBY_EXTERN VALUE rb_output_rs; VALUE rb_io_write(VALUE, VALUE); -VALUE rb_io_gets(VALUE, SEL); -VALUE rb_io_getbyte(VALUE, SEL); -VALUE rb_io_ungetc(VALUE, SEL, VALUE); VALUE rb_io_close(VALUE); -VALUE rb_io_flush(VALUE, SEL); -VALUE rb_io_eof(VALUE, SEL); -VALUE rb_io_binmode(VALUE, SEL); -VALUE rb_io_addstr(VALUE, SEL, VALUE); -VALUE rb_io_printf(VALUE, SEL, int, VALUE *); -VALUE rb_io_print(VALUE, SEL, int, VALUE *); VALUE rb_io_fdopen(int, int, const char*); VALUE rb_gets(void); void rb_write_error(const char*); @@ -408,10 +354,7 @@ /* numeric.c */ void rb_num_zerodiv(void); VALUE rb_num_coerce_bin(VALUE, VALUE, ID); -VALUE rb_objc_num_coerce_bin(VALUE x, VALUE Y, SEL sel); VALUE rb_num_coerce_cmp(VALUE, VALUE, ID); -VALUE rb_objc_num_coerce_cmp(VALUE, VALUE, SEL sel); -VALUE rb_num_coerce_relop(VALUE, VALUE, SEL); VALUE rb_float_new(double); VALUE rb_num2fix(VALUE); VALUE rb_fix2str(VALUE, int); @@ -439,7 +382,6 @@ VALUE rb_obj_frozen_p(VALUE); //VALUE rb_obj_id(VALUE); VALUE rb_obj_class(VALUE); -VALUE rb_class_real(VALUE, bool hide_builtin_foundation_classes); VALUE rb_class_inherited_p(VALUE, VALUE); VALUE rb_convert_type(VALUE,int,const char*,const char*); VALUE rb_check_convert_type(VALUE,int,const char*,const char*); @@ -493,7 +435,6 @@ rb_pid_t rb_spawn(int, VALUE*); VALUE rb_detach_process(rb_pid_t pid); /* range.c */ -void rb_range_extract(VALUE range, VALUE *begp, VALUE *endp, bool *exclude); VALUE rb_range_new(VALUE, VALUE, int); VALUE rb_range_beg_len(VALUE, long*, long*, long, int); int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp); @@ -531,7 +472,6 @@ void ruby_init_loadpath(void); void ruby_incpush(const char*); /* signal.c */ -VALUE rb_f_kill(VALUE, SEL, int, VALUE*); #ifdef POSIX_SIGNAL #define posix_signal ruby_posix_signal RETSIGTYPE (*posix_signal(int, RETSIGTYPE (*)(int)))(int); @@ -599,9 +539,6 @@ VALUE rb_sym_to_s(VALUE); VALUE rb_str_length(VALUE); VALUE rb_str_inspect(VALUE); -#if WITH_OBJC -bool rb_objc_str_is_pure(VALUE); -#endif // Return a string object appropriate for bstr_ calls. This does nothing for // data/binary RubyStrings. @@ -620,7 +557,6 @@ VALUE rb_struct_new(VALUE, ...); VALUE rb_struct_define(const char*, ...); VALUE rb_struct_alloc(VALUE, VALUE); -VALUE rb_struct_initialize(VALUE, SEL, VALUE); VALUE rb_struct_aref(VALUE, VALUE); VALUE rb_struct_aset(VALUE, VALUE, VALUE); VALUE rb_struct_getmember(VALUE, ID); @@ -687,27 +623,12 @@ VALUE rb_cvar_defined(VALUE, ID); void rb_cvar_set(VALUE, ID, VALUE); VALUE rb_cvar_get(VALUE, ID); -VALUE rb_cvar_get2(VALUE klass, ID id, bool check); void rb_cv_set(VALUE, const char*, VALUE); VALUE rb_cv_get(VALUE, const char*); void rb_define_class_variable(VALUE, const char*, VALUE); //VALUE rb_mod_class_variables(VALUE); //VALUE rb_mod_remove_cvar(VALUE, VALUE); /* objc.m */ -#if WITH_OBJC -void rb_objc_alias(VALUE, ID, ID); -VALUE rb_mod_objc_ancestors(VALUE); -//VALUE rb_mod_objc_ib_outlet(int, VALUE *, VALUE); -VALUE rb_require_framework(VALUE, SEL, int, VALUE *); -VALUE rb_objc_resolve_const_value(VALUE, VALUE, ID); -ID rb_objc_missing_sel(ID, int); -long rb_objc_flag_get_mask(const void *); -void rb_objc_flag_set(const void *, int, bool); -bool rb_objc_flag_check(const void *, int); -long rb_objc_remove_flags(const void *obj); -void rb_objc_methods(VALUE, Class); -bool rb_objc_is_immutable(VALUE); -#endif /* version.c */ void ruby_show_version(void); void ruby_show_copyright(void); Added: MacRuby/trunk/include/ruby/macruby.h =================================================================== --- MacRuby/trunk/include/ruby/macruby.h (rev 0) +++ MacRuby/trunk/include/ruby/macruby.h 2010-07-08 03:07:31 UTC (rev 4330) @@ -0,0 +1,162 @@ + +#ifndef RUBY_MACRUBY_H +#define RUBY_MACRUBY_H 1 + +#if defined(__cplusplus) +extern "C" { +#if 0 +} /* satisfy cc-mode */ +#endif +#endif + +#include "ruby.h" + +#include <objc/objc.h> +#include <objc/runtime.h> +#include <objc/message.h> +#include <objc/objc-auto.h> +#include <assert.h> +#include <CoreFoundation/CoreFoundation.h> + +bool rb_obj_is_native(VALUE obj); +#define NATIVE(obj) (rb_obj_is_native((VALUE)obj)) + +void rb_include_module2(VALUE klass, VALUE orig_klass, VALUE module, bool check, + bool add_methods); + +VALUE rb_objc_block_call(VALUE obj, SEL sel, int argc, + VALUE *argv, VALUE (*bl_proc) (ANYARGS), VALUE data2); + +#if !defined(__AUTO_ZONE__) +boolean_t auto_zone_set_write_barrier(void *zone, const void *dest, const void *new_value); +void auto_zone_add_root(void *zone, void *address_of_root_ptr, void *value); +void auto_zone_retain(void *zone, void *ptr); +unsigned int auto_zone_release(void *zone, void *ptr); +extern void *__auto_zone; +#else +extern auto_zone_t *__auto_zone; +#endif + +#define GC_WB(dst, newval) \ + do { \ + void *nv = (void *)newval; \ + if (!SPECIAL_CONST_P(nv)) { \ + if (!auto_zone_set_write_barrier(__auto_zone, \ + (const void *)dst, (const void *)nv)) { \ + rb_bug("destination %p isn't in the auto zone", dst); \ + } \ + } \ + *(void **)dst = nv; \ + } \ + while (0) + +static inline void * +rb_objc_retain(void *addr) +{ + if (addr != NULL && !SPECIAL_CONST_P(addr)) { + auto_zone_retain(__auto_zone, addr); + } + return addr; +} +#define GC_RETAIN(obj) (rb_objc_retain((void *)obj)) + +static inline void * +rb_objc_release(void *addr) +{ + if (addr != NULL && !SPECIAL_CONST_P(addr)) { + auto_zone_release(__auto_zone, addr); + } + return addr; +} +#define GC_RELEASE(obj) (rb_objc_release((void *)obj)) + +// MacRubyIntern.h + +#if WITH_OBJC +bool rb_objc_hash_is_pure(VALUE); +bool rb_objc_str_is_pure(VALUE); +bool rb_objc_ary_is_pure(VALUE); +long rb_ary_len(VALUE); +VALUE rb_ary_elt(VALUE, long); +VALUE rb_ary_aref(VALUE ary, SEL sel, int argc, VALUE *argv); + +VALUE rb_objc_create_class(const char *name, VALUE super); +void rb_objc_class_sync_version(Class klass, Class super_class); +void rb_define_object_special_methods(VALUE klass); +VALUE rb_class_new_instance_imp(VALUE, SEL, int, VALUE *); +VALUE rb_make_singleton_class(VALUE super); +#endif + +/* enumerator.c */ +VALUE rb_enumeratorize(VALUE, SEL, int, VALUE *); +#define RETURN_ENUMERATOR(obj, argc, argv) do { \ + if (!rb_block_given_p()) \ + return rb_enumeratorize((VALUE)obj, sel, argc, argv); \ + } while (0) +VALUE rb_f_notimplement(VALUE rcv, SEL sel); +VALUE rb_method_call(VALUE, SEL, int, VALUE*); +VALUE rb_file_directory_p(VALUE,SEL,VALUE); +VALUE rb_obj_id(VALUE obj, SEL sel); + +#if WITH_OBJC +void rb_objc_gc_register_thread(void); +void rb_objc_gc_unregister_thread(void); +void rb_objc_set_associative_ref(void *, void *, void *); +void *rb_objc_get_associative_ref(void *, void *); +# define rb_gc_mark_locations(x,y) +# define rb_mark_tbl(x) +# define rb_mark_set(x) +# define rb_mark_hash(x) +# define rb_gc_mark_maybe(x) +# define rb_gc_mark(x) +#else +void rb_gc_mark_locations(VALUE*, VALUE*); +void rb_mark_tbl(struct st_table*); +void rb_mark_set(struct st_table*); +void rb_mark_hash(struct st_table*); +void rb_gc_mark_maybe(VALUE); +void rb_gc_mark(VALUE); +#endif + +VALUE rb_io_gets(VALUE, SEL); +VALUE rb_io_getbyte(VALUE, SEL); +VALUE rb_io_ungetc(VALUE, SEL, VALUE); +VALUE rb_io_flush(VALUE, SEL); +VALUE rb_io_eof(VALUE, SEL); +VALUE rb_io_binmode(VALUE, SEL); +VALUE rb_io_addstr(VALUE, SEL, VALUE); +VALUE rb_io_printf(VALUE, SEL, int, VALUE *); +VALUE rb_io_print(VALUE, SEL, int, VALUE *); + +VALUE rb_objc_num_coerce_bin(VALUE x, VALUE Y, SEL sel); +VALUE rb_objc_num_coerce_cmp(VALUE, VALUE, SEL sel); +VALUE rb_num_coerce_relop(VALUE, VALUE, SEL); + +VALUE rb_f_kill(VALUE, SEL, int, VALUE*); +VALUE rb_struct_initialize(VALUE, SEL, VALUE); +VALUE rb_class_real(VALUE, bool hide_builtin_foundation_classes); +void rb_range_extract(VALUE range, VALUE *begp, VALUE *endp, bool *exclude); +VALUE rb_cvar_get2(VALUE klass, ID id, bool check); + +#if WITH_OBJC +void rb_objc_alias(VALUE, ID, ID); +VALUE rb_mod_objc_ancestors(VALUE); +VALUE rb_require_framework(VALUE, SEL, int, VALUE *); +VALUE rb_objc_resolve_const_value(VALUE, VALUE, ID); +ID rb_objc_missing_sel(ID, int); +long rb_objc_flag_get_mask(const void *); +void rb_objc_flag_set(const void *, int, bool); +bool rb_objc_flag_check(const void *, int); +long rb_objc_remove_flags(const void *obj); +void rb_objc_methods(VALUE, Class); +bool rb_objc_is_immutable(VALUE); +#endif + +#if defined(__cplusplus) +#if 0 +{ /* satisfy cc-mode */ +#endif +} /* extern "C" { */ +#endif + +#endif /* RUBY_MACRUBY_H */ Modified: MacRuby/trunk/include/ruby/ruby.h =================================================================== --- MacRuby/trunk/include/ruby/ruby.h 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/include/ruby/ruby.h 2010-07-08 03:07:31 UTC (rev 4330) @@ -77,13 +77,6 @@ #include "defines.h" #endif -#include <objc/objc.h> -#include <objc/runtime.h> -#include <objc/message.h> -#include <objc/objc-auto.h> -#include <assert.h> -#include <CoreFoundation/CoreFoundation.h> - #if defined(HAVE_ALLOCA_H) #include <alloca.h> #else @@ -695,9 +688,6 @@ #define FL_USER19 (((VALUE)1)<<(FL_USHIFT+19)) #define FL_USER20 (((VALUE)1)<<(FL_USHIFT+20)) -bool rb_obj_is_native(VALUE obj); -#define NATIVE(obj) (rb_obj_is_native((VALUE)obj)) - #define SPECIAL_CONST_P(x) (IMMEDIATE_P(x) || !RTEST(x)) #define FL_ABLE(x) (!SPECIAL_CONST_P(x) && !NATIVE(x) && BUILTIN_TYPE(x) != T_NODE) @@ -743,8 +733,6 @@ VALUE rb_define_module_under(VALUE, const char*); void rb_include_module(VALUE,VALUE); -void rb_include_module2(VALUE klass, VALUE orig_klass, VALUE module, bool check, - bool add_methods); void rb_extend_object(VALUE,VALUE); void rb_define_variable(const char*,VALUE*); @@ -793,7 +781,7 @@ const char *rb_class2name(VALUE); const char *rb_obj_classname(VALUE); -void rb_p(VALUE, SEL); +void rb_p(VALUE); VALUE rb_eval_string(const char*); VALUE rb_eval_string_protect(const char*, int*); @@ -848,8 +836,6 @@ void rb_need_block(void); VALUE rb_iterate(VALUE(*)(VALUE),VALUE,VALUE(*)(ANYARGS),VALUE); VALUE rb_block_call(VALUE,ID,int,VALUE*,VALUE(*)(ANYARGS),VALUE); -VALUE rb_objc_block_call(VALUE obj, SEL sel, int argc, - VALUE *argv, VALUE (*bl_proc) (ANYARGS), VALUE data2); VALUE rb_rescue(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE); VALUE rb_rescue2(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE,...); VALUE rb_ensure(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE); @@ -1039,55 +1025,13 @@ return rb_objc_type(obj); } -static inline bool +// static inline bool +static inline int rb_special_const_p(VALUE obj) { return SPECIAL_CONST_P(obj) ? Qtrue : Qfalse; } -#if !defined(__AUTO_ZONE__) -boolean_t auto_zone_set_write_barrier(void *zone, const void *dest, const void *new_value); -void auto_zone_add_root(void *zone, void *address_of_root_ptr, void *value); -void auto_zone_retain(void *zone, void *ptr); -unsigned int auto_zone_release(void *zone, void *ptr); -extern void *__auto_zone; -#else -extern auto_zone_t *__auto_zone; -#endif - -#define GC_WB(dst, newval) \ - do { \ - void *nv = (void *)newval; \ - if (!SPECIAL_CONST_P(nv)) { \ - if (!auto_zone_set_write_barrier(__auto_zone, \ - (const void *)dst, (const void *)nv)) { \ - rb_bug("destination %p isn't in the auto zone", dst); \ - } \ - } \ - *(void **)dst = nv; \ - } \ - while (0) - -static inline void * -rb_objc_retain(void *addr) -{ - if (addr != NULL && !SPECIAL_CONST_P(addr)) { - auto_zone_retain(__auto_zone, addr); - } - return addr; -} -#define GC_RETAIN(obj) (rb_objc_retain((void *)obj)) - -static inline void * -rb_objc_release(void *addr) -{ - if (addr != NULL && !SPECIAL_CONST_P(addr)) { - auto_zone_release(__auto_zone, addr); - } - return addr; -} -#define GC_RELEASE(obj) (rb_objc_release((void *)obj)) - #if RUBY_INCLUDED_AS_FRAMEWORK #include <MacRuby/ruby/missing.h> #include <MacRuby/ruby/intern.h> Modified: MacRuby/trunk/inits.c =================================================================== --- MacRuby/trunk/inits.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/inits.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" void Init_Array(void); void Init_Bignum(void); Modified: MacRuby/trunk/interpreter.cpp =================================================================== --- MacRuby/trunk/interpreter.cpp 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/interpreter.cpp 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ #if !defined(MACRUBY_STATIC) #include "llvm.h" -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "interpreter.h" #include "vm.h" Modified: MacRuby/trunk/io.c =================================================================== --- MacRuby/trunk/io.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/io.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ * Copyright (C) 2000 Information-technology Promotion Agency, Japan */ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/io.h" #include "ruby/util.h" #include "ruby/node.h" @@ -2847,7 +2847,7 @@ } void -rb_p(VALUE obj, SEL sel) /* for debug print within C code */ +rb_p(VALUE obj) /* for debug print within C code */ { rb_io_write(rb_stdout, rb_obj_as_string(rb_inspect(obj))); rb_io_write(rb_stdout, rb_default_rs); @@ -2886,7 +2886,7 @@ VALUE ret = Qnil; for (i = 0; i < argc; i++) { - rb_p(argv[i], 0); + rb_p(argv[i]); } if (argc == 1) { ret = argv[0]; Modified: MacRuby/trunk/kernel.c =================================================================== --- MacRuby/trunk/kernel.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/kernel.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -8,7 +8,7 @@ * Copyright (C) 2010, Apple Inc. All rights reserved. */ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "vm.h" #include "compiler.h" Modified: MacRuby/trunk/load.c =================================================================== --- MacRuby/trunk/load.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/load.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -7,7 +7,7 @@ */ #include <sys/stat.h> -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "vm.h" #include "dln.h" Modified: MacRuby/trunk/main.cpp =================================================================== --- MacRuby/trunk/main.cpp 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/main.cpp 2010-07-08 03:07:31 UTC (rev 4330) @@ -8,7 +8,7 @@ #include "llvm.h" #undef RUBY_EXPORT -#include "ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #ifdef HAVE_LOCALE_H #include <locale.h> Modified: MacRuby/trunk/marshal.c =================================================================== --- MacRuby/trunk/marshal.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/marshal.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/io.h" #include "ruby/st.h" #include "ruby/util.h" Modified: MacRuby/trunk/math.c =================================================================== --- MacRuby/trunk/math.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/math.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include <math.h> #include <errno.h> Modified: MacRuby/trunk/numeric.c =================================================================== --- MacRuby/trunk/numeric.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/numeric.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -7,7 +7,7 @@ * Copyright (C) 1993-2007 Yukihiro Matsumoto */ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/encoding.h" #include <ctype.h> #include <math.h> Modified: MacRuby/trunk/objc.m =================================================================== --- MacRuby/trunk/objc.m 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/objc.m 2010-07-08 03:07:31 UTC (rev 4330) @@ -7,7 +7,7 @@ */ #include <Foundation/Foundation.h> -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "ruby/encoding.h" #include "ruby/objc.h" Modified: MacRuby/trunk/object.c =================================================================== --- MacRuby/trunk/object.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/object.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ * Copyright (C) 2000 Information-technology Promotion Agency, Japan */ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/st.h" #include "ruby/util.h" #include "ruby/node.h" Modified: MacRuby/trunk/pack.c =================================================================== --- MacRuby/trunk/pack.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/pack.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -13,7 +13,7 @@ #include <ctype.h> #include <errno.h> -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "vm.h" #include "encoding.h" Modified: MacRuby/trunk/parse.y =================================================================== --- MacRuby/trunk/parse.y 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/parse.y 2010-07-08 03:07:31 UTC (rev 4330) @@ -15,7 +15,7 @@ #define YYERROR_VERBOSE 1 #define YYSTACK_USE_ALLOCA 0 -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/intern.h" #define __IN_PARSE_Y__ 1 #include "ruby/node.h" Modified: MacRuby/trunk/prec.c =================================================================== --- MacRuby/trunk/prec.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/prec.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" VALUE rb_mPrecision; Modified: MacRuby/trunk/proc.c =================================================================== --- MacRuby/trunk/proc.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/proc.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -7,7 +7,7 @@ * Copyright (C) 2004-2007 Koichi Sasada */ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "vm.h" #include "class.h" Modified: MacRuby/trunk/process.c =================================================================== --- MacRuby/trunk/process.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/process.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -11,7 +11,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/signal.h" #include "ruby/io.h" #include "ruby/util.h" Modified: MacRuby/trunk/random.c =================================================================== --- MacRuby/trunk/random.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/random.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -7,7 +7,7 @@ * Copyright (C) 1993-2007 Yukihiro Matsumoto */ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "vm.h" #include "id.h" Modified: MacRuby/trunk/range.c =================================================================== --- MacRuby/trunk/range.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/range.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/encoding.h" #include "ruby/node.h" #include "vm.h" Modified: MacRuby/trunk/rational.c =================================================================== --- MacRuby/trunk/rational.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/rational.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -5,7 +5,7 @@ which is written in ruby. */ -#include "ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "vm.h" Modified: MacRuby/trunk/re.cpp =================================================================== --- MacRuby/trunk/re.cpp 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/re.cpp 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ #include "unicode/regex.h" #include "unicode/unistr.h" -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "encoding.h" #include "objc.h" #include "re.h" Modified: MacRuby/trunk/ruby.c =================================================================== --- MacRuby/trunk/ruby.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/ruby.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -18,7 +18,7 @@ #include <fcntl.h> #include <sys/param.h> -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "ruby/encoding.h" #include "dln.h" Modified: MacRuby/trunk/signal.c =================================================================== --- MacRuby/trunk/signal.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/signal.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -13,7 +13,7 @@ // TODO: rewrite me! -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/signal.h" #include "ruby/node.h" #include "id.h" Modified: MacRuby/trunk/sprintf.c =================================================================== --- MacRuby/trunk/sprintf.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/sprintf.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -11,7 +11,7 @@ #include <stdarg.h> -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/encoding.h" #include "encoding.h" Modified: MacRuby/trunk/st.c =================================================================== --- MacRuby/trunk/st.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/st.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ #include "ruby/config.h" #include "ruby/defines.h" #include "ruby/st.h" -#include "ruby/ruby.h" +#include "ruby/macruby.h" #endif #include <stdio.h> Modified: MacRuby/trunk/string.c =================================================================== --- MacRuby/trunk/string.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/string.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -14,7 +14,7 @@ #include <wctype.h> #include <unistd.h> -#include "ruby.h" +#include "ruby/macruby.h" #include "ruby/encoding.h" #include "encoding.h" #include "re.h" Modified: MacRuby/trunk/struct.c =================================================================== --- MacRuby/trunk/struct.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/struct.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "vm.h" Modified: MacRuby/trunk/symbol.c =================================================================== --- MacRuby/trunk/symbol.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/symbol.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -8,7 +8,7 @@ #include <wctype.h> -#include "ruby.h" +#include "ruby/macruby.h" #include "ruby/encoding.h" #include "encoding.h" #include "symbol.h" Modified: MacRuby/trunk/thread.c =================================================================== --- MacRuby/trunk/thread.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/thread.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -7,7 +7,7 @@ * Copyright (C) 2004-2007 Koichi Sasada */ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "vm.h" Modified: MacRuby/trunk/time.c =================================================================== --- MacRuby/trunk/time.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/time.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -13,7 +13,7 @@ #include <unistd.h> #include <math.h> -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/encoding.h" #include "encoding.h" #include "objc.h" Modified: MacRuby/trunk/transcode.c =================================================================== --- MacRuby/trunk/transcode.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/transcode.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -12,7 +12,7 @@ // Notes: // AFAICT, we need to add support for newline decorators. -#include "ruby.h" +#include "ruby/macruby.h" #include "ruby/encoding.h" #include "encoding.h" Modified: MacRuby/trunk/ucnv.c =================================================================== --- MacRuby/trunk/ucnv.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/ucnv.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ * Copyright (C) 2000 Information-technology Promotion Agency, Japan */ -#include "ruby.h" +#include "ruby/macruby.h" #include "encoding.h" #include "unicode/ucnv.h" Modified: MacRuby/trunk/util.c =================================================================== --- MacRuby/trunk/util.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/util.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include <ctype.h> #include <stdio.h> Modified: MacRuby/trunk/variable.c =================================================================== --- MacRuby/trunk/variable.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/variable.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -6,7 +6,7 @@ * Copyright (C) 2000 Information-technology Promotion Agency, Japan */ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "ruby/st.h" #include "ruby/util.h" Modified: MacRuby/trunk/version.c =================================================================== --- MacRuby/trunk/version.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/version.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -9,7 +9,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "version.h" #include "revision.h" #include <stdio.h> Modified: MacRuby/trunk/vm.cpp =================================================================== --- MacRuby/trunk/vm.cpp 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/vm.cpp 2010-07-08 03:07:31 UTC (rev 4330) @@ -49,7 +49,7 @@ # include <mach/mach_time.h> #endif -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "id.h" #include "vm.h" Modified: MacRuby/trunk/vm_eval.c =================================================================== --- MacRuby/trunk/vm_eval.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/vm_eval.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -11,7 +11,7 @@ **********************************************************************/ -#include "ruby/ruby.h" +#include "ruby/macruby.h" #include "ruby/node.h" #include "ruby/st.h" #include "vm.h" Modified: MacRuby/trunk/vm_method.c =================================================================== --- MacRuby/trunk/vm_method.c 2010-07-07 23:22:47 UTC (rev 4329) +++ MacRuby/trunk/vm_method.c 2010-07-08 03:07:31 UTC (rev 4330) @@ -243,7 +243,7 @@ static SEL selRespondToDefault = 0; static bool -rb_obj_respond_to2(VALUE obj, VALUE klass, ID id, bool priv, bool check_override) +rb_obj_respond_to2(VALUE obj, VALUE klass, ID id, int priv, int check_override) { const char *id_name = rb_id2name(id); SEL sel = sel_registerName(id_name); @@ -657,13 +657,13 @@ * method is called and the result is returned. */ -bool -rb_obj_respond_to(VALUE obj, ID id, bool priv) +int +rb_obj_respond_to(VALUE obj, ID id, int priv) { return rb_obj_respond_to2(obj, Qnil, id, priv, true); } -bool +int rb_respond_to(VALUE obj, ID id) { return rb_obj_respond_to(obj, id, false);