ruby-changes:53651
From: samuel <ko1@a...>
Date: Tue, 20 Nov 2018 21:42:44 +0900 (JST)
Subject: [ruby-changes:53651] samuel:r65861 (trunk): Prefer "static inline" to avoid duplicate symbols.
samuel 2018-11-20 19:17:17 +0900 (Tue, 20 Nov 2018) New Revision: 65861 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65861 Log: Prefer "static inline" to avoid duplicate symbols. Modified files: trunk/coroutine/amd64/Context.h trunk/coroutine/arm32/Context.h trunk/coroutine/arm64/Context.h trunk/coroutine/win32/Context.h trunk/coroutine/win64/Context.h trunk/coroutine/x86/Context.h Index: coroutine/win32/Context.h =================================================================== --- coroutine/win32/Context.h (revision 65860) +++ coroutine/win32/Context.h (revision 65861) @@ -25,7 +25,7 @@ struct coroutine_context https://github.com/ruby/ruby/blob/trunk/coroutine/win32/Context.h#L25 typedef COROUTINE(* coroutine_start)(coroutine_context *from, coroutine_context *self); -inline void coroutine_initialize( +static inline void coroutine_initialize( coroutine_context *context, coroutine_start start, void *stack_pointer, @@ -52,7 +52,7 @@ inline void coroutine_initialize( https://github.com/ruby/ruby/blob/trunk/coroutine/win32/Context.h#L52 coroutine_context * __fastcall coroutine_transfer(coroutine_context * current, coroutine_context * target); -inline void coroutine_destroy(coroutine_context * context) +static inline void coroutine_destroy(coroutine_context * context) { } Index: coroutine/arm32/Context.h =================================================================== --- coroutine/arm32/Context.h (revision 65860) +++ coroutine/arm32/Context.h (revision 65861) @@ -25,7 +25,7 @@ typedef struct https://github.com/ruby/ruby/blob/trunk/coroutine/arm32/Context.h#L25 typedef COROUTINE(* coroutine_start)(coroutine_context *from, coroutine_context *self); -inline void coroutine_initialize( +static inline void coroutine_initialize( coroutine_context *context, coroutine_start start, void *stack_pointer, @@ -47,7 +47,7 @@ inline void coroutine_initialize( https://github.com/ruby/ruby/blob/trunk/coroutine/arm32/Context.h#L47 coroutine_context * coroutine_transfer(coroutine_context * current, coroutine_context * target); -inline void coroutine_destroy(coroutine_context * context) +static inline void coroutine_destroy(coroutine_context * context) { } Index: coroutine/x86/Context.h =================================================================== --- coroutine/x86/Context.h (revision 65860) +++ coroutine/x86/Context.h (revision 65861) @@ -25,11 +25,11 @@ typedef struct https://github.com/ruby/ruby/blob/trunk/coroutine/x86/Context.h#L25 typedef COROUTINE(* coroutine_start)(coroutine_context *from, coroutine_context *self) __attribute__((fastcall)); -void coroutine_initialize( - coroutine_context *context, - coroutine_start start, - void *stack_pointer, - size_t stack_size +static inline void coroutine_initialize( + coroutine_context *context, + coroutine_start start, + void *stack_pointer, + size_t stack_size ) { /* Force 16-byte alignment */ context->stack_pointer = (void**)((uintptr_t)stack_pointer & ~0xF); @@ -49,7 +49,7 @@ void coroutine_initialize( https://github.com/ruby/ruby/blob/trunk/coroutine/x86/Context.h#L49 coroutine_context * coroutine_transfer(coroutine_context * current, coroutine_context * target) __attribute__((fastcall)); -inline void coroutine_destroy(coroutine_context * context) +static inline void coroutine_destroy(coroutine_context * context) { context->stack_pointer = NULL; } Index: coroutine/win64/Context.h =================================================================== --- coroutine/win64/Context.h (revision 65860) +++ coroutine/win64/Context.h (revision 65861) @@ -25,7 +25,7 @@ struct coroutine_context https://github.com/ruby/ruby/blob/trunk/coroutine/win64/Context.h#L25 typedef COROUTINE(* coroutine_start)(coroutine_context *from, coroutine_context *self); -inline void coroutine_initialize( +static inline void coroutine_initialize( coroutine_context *context, coroutine_start start, void *stack_pointer, @@ -52,7 +52,7 @@ inline void coroutine_initialize( https://github.com/ruby/ruby/blob/trunk/coroutine/win64/Context.h#L52 coroutine_context * coroutine_transfer(coroutine_context * current, coroutine_context * target); -inline void coroutine_destroy(coroutine_context * context) +static inline void coroutine_destroy(coroutine_context * context) { } Index: coroutine/arm64/Context.h =================================================================== --- coroutine/arm64/Context.h (revision 65860) +++ coroutine/arm64/Context.h (revision 65861) @@ -25,7 +25,7 @@ typedef struct https://github.com/ruby/ruby/blob/trunk/coroutine/arm64/Context.h#L25 typedef COROUTINE(* coroutine_start)(coroutine_context *from, coroutine_context *self); -inline void coroutine_initialize( +static inline void coroutine_initialize( coroutine_context *context, coroutine_start start, void *stack_pointer, @@ -48,7 +48,7 @@ inline void coroutine_initialize( https://github.com/ruby/ruby/blob/trunk/coroutine/arm64/Context.h#L48 coroutine_context * coroutine_transfer(coroutine_context * current, coroutine_context * target); -inline void coroutine_destroy(coroutine_context * context) +static inline void coroutine_destroy(coroutine_context * context) { } Index: coroutine/amd64/Context.h =================================================================== --- coroutine/amd64/Context.h (revision 65860) +++ coroutine/amd64/Context.h (revision 65861) @@ -25,7 +25,7 @@ typedef struct https://github.com/ruby/ruby/blob/trunk/coroutine/amd64/Context.h#L25 typedef COROUTINE(* coroutine_start)(coroutine_context *from, coroutine_context *self); -inline void coroutine_initialize( +static inline void coroutine_initialize( coroutine_context *context, coroutine_start start, void *stack_pointer, @@ -49,7 +49,7 @@ inline void coroutine_initialize( https://github.com/ruby/ruby/blob/trunk/coroutine/amd64/Context.h#L49 coroutine_context * coroutine_transfer(coroutine_context * current, coroutine_context * target); -inline void coroutine_destroy(coroutine_context * context) +static inline void coroutine_destroy(coroutine_context * context) { context->stack_pointer = NULL; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/