mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
vm_core.h: fix inconsistent prototype declarations
like "error: static declaration of 'xxx' follows non-static declaration". r64940 is successfully built on mswin but not built on almost all other environments. internal.h: ditto include/ruby/intern.h: MJIT_STATIC is moved to this file since this file also needs to use this. mjit.h: MJIT_STATIC is moved from this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
950d100700
commit
d590027fd2
4 changed files with 18 additions and 18 deletions
|
@ -34,6 +34,18 @@ extern "C" {
|
|||
|
||||
#include "ruby/st.h"
|
||||
|
||||
/* On mswin, MJIT header transformation can't be used since cl.exe can't output
|
||||
preprocessed output preserving macros. So this `MJIT_STATIC` is needed
|
||||
to force non-static function to static on MJIT header to avoid symbol conflict.
|
||||
`MJIT_FUNC_EXPORTED` is also changed to `static` on MJIT header for the same reason. */
|
||||
#ifdef MJIT_HEADER
|
||||
# define MJIT_STATIC static
|
||||
# undef MJIT_FUNC_EXPORTED
|
||||
# define MJIT_FUNC_EXPORTED static
|
||||
#else
|
||||
# define MJIT_STATIC
|
||||
#endif
|
||||
|
||||
RUBY_SYMBOL_EXPORT_BEGIN
|
||||
|
||||
/*
|
||||
|
@ -286,7 +298,7 @@ int rb_sourceline(void);
|
|||
const char *rb_sourcefile(void);
|
||||
VALUE rb_check_funcall(VALUE, ID, int, const VALUE*);
|
||||
|
||||
NORETURN(void rb_error_arity(int, int, int));
|
||||
NORETURN(MJIT_STATIC void rb_error_arity(int, int, int));
|
||||
static inline int
|
||||
rb_check_arity(int argc, int min, int max)
|
||||
{
|
||||
|
|
|
@ -1914,11 +1914,11 @@ void rb_vm_inc_const_missing_count(void);
|
|||
const void **rb_vm_get_insns_address_table(void);
|
||||
VALUE rb_source_location(int *pline);
|
||||
const char *rb_source_location_cstr(int *pline);
|
||||
void rb_vm_pop_cfunc_frame(void);
|
||||
MJIT_STATIC void rb_vm_pop_cfunc_frame(void);
|
||||
int rb_vm_add_root_module(ID id, VALUE module);
|
||||
void rb_vm_check_redefinition_by_prepend(VALUE klass);
|
||||
VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
|
||||
VALUE ruby_vm_special_exception_copy(VALUE);
|
||||
MJIT_STATIC VALUE ruby_vm_special_exception_copy(VALUE);
|
||||
PUREFUNC(st_table *rb_vm_fstring_table(void));
|
||||
|
||||
|
||||
|
|
12
mjit.h
12
mjit.h
|
@ -11,18 +11,6 @@
|
|||
|
||||
#include "ruby.h"
|
||||
|
||||
/* On mswin, MJIT header transformation can't be used since cl.exe can't output
|
||||
preprocessed output preserving macros. So this `MJIT_STATIC` is needed
|
||||
to force non-static function to static on MJIT header to avoid symbol conflict.
|
||||
`MJIT_FUNC_EXPORTED` is also changed to `static` on MJIT header for the same reason. */
|
||||
#ifdef MJIT_HEADER
|
||||
# define MJIT_STATIC static
|
||||
# undef MJIT_FUNC_EXPORTED
|
||||
# define MJIT_FUNC_EXPORTED static
|
||||
#else
|
||||
# define MJIT_STATIC
|
||||
#endif
|
||||
|
||||
/* Special address values of a function generated from the
|
||||
corresponding iseq by MJIT: */
|
||||
enum rb_mjit_iseq_func {
|
||||
|
|
|
@ -1578,7 +1578,7 @@ void rb_vm_inc_const_missing_count(void);
|
|||
void rb_vm_gvl_destroy(rb_vm_t *vm);
|
||||
VALUE rb_vm_call(rb_execution_context_t *ec, VALUE recv, VALUE id, int argc,
|
||||
const VALUE *argv, const rb_callable_method_entry_t *me);
|
||||
void rb_vm_pop_frame(rb_execution_context_t *ec);
|
||||
MJIT_STATIC void rb_vm_pop_frame(rb_execution_context_t *ec);
|
||||
|
||||
void rb_thread_start_timer_thread(void);
|
||||
void rb_thread_stop_timer_thread(void);
|
||||
|
@ -1618,7 +1618,7 @@ void rb_vm_stack_to_heap(rb_execution_context_t *ec);
|
|||
void ruby_thread_init_stack(rb_thread_t *th);
|
||||
int rb_vm_control_frame_id_and_class(const rb_control_frame_t *cfp, ID *idp, ID *called_idp, VALUE *klassp);
|
||||
void rb_vm_rewind_cfp(rb_execution_context_t *ec, rb_control_frame_t *cfp);
|
||||
VALUE rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler);
|
||||
MJIT_STATIC VALUE rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler);
|
||||
|
||||
void rb_vm_register_special_exception_str(enum ruby_special_exceptions sp, VALUE exception_class, VALUE mesg);
|
||||
|
||||
|
@ -1629,7 +1629,7 @@ void rb_gc_mark_machine_stack(const rb_execution_context_t *ec);
|
|||
|
||||
void rb_vm_rewrite_cref(rb_cref_t *node, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr);
|
||||
|
||||
const rb_callable_method_entry_t *rb_vm_frame_method_entry(const rb_control_frame_t *cfp);
|
||||
MJIT_STATIC const rb_callable_method_entry_t *rb_vm_frame_method_entry(const rb_control_frame_t *cfp);
|
||||
|
||||
#define sysstack_error GET_VM()->special_exceptions[ruby_error_sysstack]
|
||||
|
||||
|
|
Loading…
Reference in a new issue