From 073297789aac2e4e4208d2bd228627a86c9f9460 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 14 Jun 2012 03:03:48 +0000 Subject: fix r36079 * include/ruby/ruby.h: public symbols must have default visibility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 2 +- include/ruby/ruby.h | 10 +++++----- nacl/pepper_main.c | 12 ++++++------ ruby.c | 4 ++-- vm_core.h | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/eval.c b/eval.c index 499edfbbbf..139c320733 100644 --- a/eval.c +++ b/eval.c @@ -283,7 +283,7 @@ ruby_eval_main_internal(VALUE iseqval, VALUE* result) }); } POP_TAG(); - *result = state ? th->errinfo : retval; + *result = state ? th->errinfo : retval; return state; } diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 39996483d9..626f283ed2 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1464,10 +1464,6 @@ unsigned long ruby_strtoul(const char *str, char **endptr, int base); PRINTF_ARGS(int ruby_snprintf(char *str, size_t n, char const *fmt, ...), 3, 4); int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap); -#if defined __GNUC__ && __GNUC__ >= 4 -#pragma GCC visibility pop -#endif - #ifndef RUBY_DONT_SUBST #include "ruby/subst.h" #endif @@ -1488,7 +1484,7 @@ int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap); */ typedef void *ruby_opaque_t; -/*! @deprecated You no longer need to use this macro. */ +/*! @deprecated You no longer need to use this macro. */ #if (defined(__APPLE__) || defined(__NeXT__)) && defined(__MACH__) #define RUBY_GLOBAL_SETUP /* use linker option to link startup code with ObjC support */ #else @@ -1555,6 +1551,10 @@ void ruby_sig_finalize(void); /*! @} */ +#if defined __GNUC__ && __GNUC__ >= 4 +#pragma GCC visibility pop +#endif + #if defined(__cplusplus) #if 0 { /* satisfy cc-mode */ diff --git a/nacl/pepper_main.c b/nacl/pepper_main.c index 32643fd701..1d16965839 100644 --- a/nacl/pepper_main.c +++ b/nacl/pepper_main.c @@ -265,8 +265,8 @@ pruby_str_to_var(volatile VALUE str) static struct PP_Var pruby_obj_to_var(volatile VALUE obj) -{ - static const char* const error = +{ + static const char* const error = "throw 'Failed to convert the result to a JavaScript object';"; int state; obj = rb_protect(&rb_obj_as_string, obj, &state); @@ -318,7 +318,7 @@ pruby_post_cstr(void* data) /* PPAPI main thread */ struct PepperInstance* const instance = (struct PepperInstance*)data; const char* const msg = (const char*)instance->async_call_args; - messaging_interface->PostMessage(instance->instance, + messaging_interface->PostMessage(instance->instance, pruby_cstr_to_var(msg)); } @@ -445,7 +445,7 @@ pruby_eval(void* data) pthread_mutex_unlock(&instance->mutex); if (!state) { - instance->async_call_args = + instance->async_call_args = rb_str_concat(rb_usascii_str_new_cstr("return:"), rb_obj_as_string(result)); core_interface->CallOnMainThread( @@ -805,7 +805,7 @@ load_file_read_contents_callback(void *data, int result) { struct PepperInstance* const instance = (struct PepperInstance*)data; if (result > 0) { - rb_str_buf_cat(instance->async_call_result.as_value, + rb_str_buf_cat(instance->async_call_result.as_value, instance->buf, result); loader_interface->ReadResponseBody( instance->url_loader, instance->buf, 1000, PP_MakeCompletionCallback(load_file_read_contents_callback, instance)); @@ -868,7 +868,7 @@ rb_load_file(const char *path) } else if (RB_TYPE_P(instance->async_call_result.as_value, T_STRING)) { VALUE str = instance->async_call_result.as_value; - extern void* rb_compile_cstr(const char *f, const char *s, int len, int line); + extern void* rb_compile_cstr(const char *f, const char *s, int len, int line); return rb_compile_cstr(path, RSTRING_PTR(str), RSTRING_LEN(str), 0); } else { diff --git a/ruby.c b/ruby.c index 72fddc4e22..592c584559 100644 --- a/ruby.c +++ b/ruby.c @@ -1753,7 +1753,7 @@ parse_and_compile_main(VALUE fname, const struct ruby_compile_main_arg* arg, VAL * @li loads the file specified by path. * @li parses the source and compiles it * - * @param fname $0 is set to this value. + * @param fname $0 is set to this value. * If nil, * uses the given path instead. * @param path path to the source @@ -1776,7 +1776,7 @@ ruby_compile_main_from_file(VALUE fname, const char* path, VALUE* error) * * This function parses the given source and compiles it * - * @param fname $0 is set to this value. + * @param fname $0 is set to this value. * @param source Ruby source string * @param error where to store the exception if an error occured. * @return The compiled source code. Or NULL if an error occured. diff --git a/vm_core.h b/vm_core.h index e77d3b83e5..aad5e1c310 100644 --- a/vm_core.h +++ b/vm_core.h @@ -459,7 +459,7 @@ typedef struct rb_thread_struct { struct rb_vm_protect_tag *protect_tag; /*! Thread-local state of evaluation context. - * + * * If negative, this thread is evaluating the main program. * If positive, this thread is evaluating a program under Kernel::eval * family. -- cgit v1.2.3