ruby-changes:64999
From: Nobuyoshi <ko1@a...>
Date: Fri, 22 Jan 2021 23:46:52 +0900 (JST)
Subject: [ruby-changes:64999] f1c36f2e6b (master): Added include guards to coroutine headers
https://git.ruby-lang.org/ruby.git/commit/?id=f1c36f2e6b From f1c36f2e6b0cd24dbcc9faf81a2ab88040eded2c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 22 Jan 2021 23:21:25 +0900 Subject: Added include guards to coroutine headers diff --git a/coroutine/Stack.h b/coroutine/Stack.h index f0fc703..b3f57dc 100644 --- a/coroutine/Stack.h +++ b/coroutine/Stack.h @@ -1,3 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/coroutine/Stack.h#L1 +#ifndef COROUTINE_STACK_H +#define COROUTINE_STACK_H 1 + /* * This file is part of the "Coroutine" project and released under the MIT License. * @@ -14,3 +17,5 @@ https://github.com/ruby/ruby/blob/trunk/coroutine/Stack.h#L17 #define COROUTINE_STACK_LOCAL(type, name) type name##_local; type * name = &name##_local #define COROUTINE_STACK_FREE(name) #endif + +#endif /* COROUTINE_STACK_H */ diff --git a/coroutine/amd64/Context.h b/coroutine/amd64/Context.h index 581525b..676975f 100644 --- a/coroutine/amd64/Context.h +++ b/coroutine/amd64/Context.h @@ -1,3 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/coroutine/amd64/Context.h#L1 +#ifndef COROUTINE_AMD64_CONTEXT_H +#define COROUTINE_AMD64_CONTEXT_H 1 + /* * This file is part of the "Coroutine" project and released under the MIT License. * @@ -52,3 +55,5 @@ static inline void coroutine_destroy(struct coroutine_context * context) https://github.com/ruby/ruby/blob/trunk/coroutine/amd64/Context.h#L55 { context->stack_pointer = NULL; } + +#endif /* COROUTINE_AMD64_CONTEXT_H */ diff --git a/coroutine/arm32/Context.h b/coroutine/arm32/Context.h index e69f4b2..a1c5e03 100644 --- a/coroutine/arm32/Context.h +++ b/coroutine/arm32/Context.h @@ -1,3 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/coroutine/arm32/Context.h#L1 +#ifndef COROUTINE_ARM32_CONTEXT_H +#define COROUTINE_ARM32_CONTEXT_H 1 + /* * This file is part of the "Coroutine" project and released under the MIT License. * @@ -51,3 +54,5 @@ struct coroutine_context * coroutine_transfer(struct coroutine_context * current https://github.com/ruby/ruby/blob/trunk/coroutine/arm32/Context.h#L54 static inline void coroutine_destroy(struct coroutine_context * context) { } + +#endif /* COROUTINE_ARM32_CONTEXT_H */ diff --git a/coroutine/arm64/Context.h b/coroutine/arm64/Context.h index 34be995..0ba7354 100644 --- a/coroutine/arm64/Context.h +++ b/coroutine/arm64/Context.h @@ -1,3 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/coroutine/arm64/Context.h#L1 +#ifndef COROUTINE_ARM64_CONTEXT_H +#define COROUTINE_ARM64_CONTEXT_H 1 + /* * This file is part of the "Coroutine" project and released under the MIT License. * @@ -50,3 +53,5 @@ struct coroutine_context * coroutine_transfer(struct coroutine_context * current https://github.com/ruby/ruby/blob/trunk/coroutine/arm64/Context.h#L53 static inline void coroutine_destroy(struct coroutine_context * context) { } + +#endif /* COROUTINE_ARM64_CONTEXT_H */ diff --git a/coroutine/copy/Context.h b/coroutine/copy/Context.h index 6038f00..db13604 100644 --- a/coroutine/copy/Context.h +++ b/coroutine/copy/Context.h @@ -1,3 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/coroutine/copy/Context.h#L1 +#ifndef COROUTINE_COPY_CONTEXT_H +#define COROUTINE_COPY_CONTEXT_H 1 + /* * This file is part of the "Coroutine" project and released under the MIT License. * @@ -88,3 +91,5 @@ static inline void coroutine_destroy(struct coroutine_context *context) https://github.com/ruby/ruby/blob/trunk/coroutine/copy/Context.h#L91 context->size = 0; context->from = NULL; } + +#endif /* COROUTINE_COPY_CONTEXT_H */ diff --git a/coroutine/ppc64le/Context.h b/coroutine/ppc64le/Context.h index e36f9c3..7a7d9fe 100644 --- a/coroutine/ppc64le/Context.h +++ b/coroutine/ppc64le/Context.h @@ -1,3 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/coroutine/ppc64le/Context.h#L1 +#ifndef COROUTINE_PPC64LE_CONTEXT_H +#define COROUTINE_PPC64LE_CONTEXT_H 1 + #pragma once #include <assert.h> @@ -49,3 +52,5 @@ static inline void coroutine_destroy(struct coroutine_context * context) https://github.com/ruby/ruby/blob/trunk/coroutine/ppc64le/Context.h#L52 { context->stack_pointer = NULL; } + +#endif /* COROUTINE_PPC64LE_CONTEXT_H */ diff --git a/coroutine/ucontext/Context.h b/coroutine/ucontext/Context.h index 2b2a593..7971086 100644 --- a/coroutine/ucontext/Context.h +++ b/coroutine/ucontext/Context.h @@ -1,3 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/coroutine/ucontext/Context.h#L1 +#ifndef COROUTINE_UCONTEXT_CONTEXT_H +#define COROUTINE_UCONTEXT_CONTEXT_H 1 + /* * This file is part of the "Coroutine" project and released under the MIT License. * @@ -68,3 +71,5 @@ static inline void coroutine_destroy(struct coroutine_context * context) https://github.com/ruby/ruby/blob/trunk/coroutine/ucontext/Context.h#L71 context->state.uc_stack.ss_size = 0; context->from = NULL; } + +#endif /* COROUTINE_UCONTEXT_CONTEXT_H */ diff --git a/coroutine/win32/Context.h b/coroutine/win32/Context.h index e20342a..dd12da6 100644 --- a/coroutine/win32/Context.h +++ b/coroutine/win32/Context.h @@ -1,3 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/coroutine/win32/Context.h#L1 +#ifndef COROUTINE_WIN32_CONTEXT_H +#define COROUTINE_WIN32_CONTEXT_H 1 + /* * This file is part of the "Coroutine" project and released under the MIT License. * @@ -57,3 +60,5 @@ struct coroutine_context * __fastcall coroutine_transfer(struct coroutine_contex https://github.com/ruby/ruby/blob/trunk/coroutine/win32/Context.h#L60 static inline void coroutine_destroy(struct coroutine_context * context) { } + +#endif /* COROUTINE_WIN32_CONTEXT_H */ diff --git a/coroutine/win64/Context.h b/coroutine/win64/Context.h index e28e6a6..d5834cf 100644 --- a/coroutine/win64/Context.h +++ b/coroutine/win64/Context.h @@ -1,3 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/coroutine/win64/Context.h#L1 +#ifndef COROUTINE_WIN64_CONTEXT_H +#define COROUTINE_WIN64_CONTEXT_H 1 + /* * This file is part of the "Coroutine" project and released under the MIT License. * @@ -67,3 +70,5 @@ struct coroutine_context * coroutine_transfer(struct coroutine_context * current https://github.com/ruby/ruby/blob/trunk/coroutine/win64/Context.h#L70 static inline void coroutine_destroy(struct coroutine_context * context) { } + +#endif /* COROUTINE_WIN64_CONTEXT_H */ diff --git a/coroutine/x86/Context.h b/coroutine/x86/Context.h index dfdde24..1d709fa 100644 --- a/coroutine/x86/Context.h +++ b/coroutine/x86/Context.h @@ -1,3 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/coroutine/x86/Context.h#L1 +#ifndef COROUTINE_X86_CONTEXT_H +#define COROUTINE_X86_CONTEXT_H 1 + /* * This file is part of the "Coroutine" project and released under the MIT License. * @@ -53,3 +56,5 @@ static inline void coroutine_destroy(struct coroutine_context * context) https://github.com/ruby/ruby/blob/trunk/coroutine/x86/Context.h#L56 { context->stack_pointer = NULL; } + +#endif /* COROUTINE_X86_CONTEXT_H */ -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/