summaryrefslogtreecommitdiffstats
path: root/include/ruby/ruby.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-29 08:45:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-29 08:45:24 +0000
commitb388d7481465af78c6ae6d79fb0e380e82108737 (patch)
treecaf9e474c3c55bae35e661a59cb3d83f6f52dfb5 /include/ruby/ruby.h
parentbf2a8104b4c3e5011ba05f549146ecc722c4efaf (diff)
downloadruby-b388d7481465af78c6ae6d79fb0e380e82108737.tar.gz
ruby-b388d7481465af78c6ae6d79fb0e380e82108737.tar.xz
ruby-b388d7481465af78c6ae6d79fb0e380e82108737.zip
* main.c (main): use platform-independent per-process initialization.
[ruby-dev:31900] * ruby.c (ruby_sysinit): new function for per-process initialization. * include/ruby/ruby.h (RUBY_GLOBAL_SETUP): toplevel setup declaration. * include/ruby/win32.h, win32/mkexports.rb: alias NtInitialize ruby_sysinit. * win32/win32.c (rb_w32_sysinit): renamed from NtInitialize. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/ruby.h')
-rw-r--r--include/ruby/ruby.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 8947549f5..b6039fb36 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -958,6 +958,15 @@ rb_special_const_p(VALUE obj)
static char *dln_libs_to_be_linked[] = { EXTLIB, 0 };
#endif
+#if (defined(__APPLE__) || defined(__NeXT__)) && defined(__MACH__)
+/* to link startup code with ObjC support */
+#define RUBY_GLOBAL_SETUP static void objcdummyfunction(void) {objc_msgSend();}
+#else
+#define RUBY_GLOBAL_SETUP
+#endif
+
+void ruby_sysinit(int *, char ***);
+
#define RUBY_VM 1 /* YARV */
#define HAVE_NATIVETHREAD
int is_ruby_native_thread(void);