aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2023-08-25 13:47:10 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2023-08-25 17:27:53 +0900
commitc914382db201bd1c4414fe3581d9da1af474ec18 (patch)
treef18ef76f825d6142bfb9c99d73190a5fc88bb535
parentfa2712981fc109368bf914e59577fcfdbf82379a (diff)
downloadruby-c914382db201bd1c4414fe3581d9da1af474ec18.tar.gz
do not redefine a typedef
duplicated typedef declaration was not allowed in C99.
-rw-r--r--internal/ruby_parser.h3
-rw-r--r--rubyparser.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/internal/ruby_parser.h b/internal/ruby_parser.h
index 97ac49dd3b..c6240cf9fa 100644
--- a/internal/ruby_parser.h
+++ b/internal/ruby_parser.h
@@ -1,8 +1,9 @@
#ifndef INTERNAL_RUBY_PARSE_H
#define INTERNAL_RUBY_PARSE_H
-#include "rubyparser.h"
#include "internal.h"
+#include "internal/imemo.h"
+#include "rubyparser.h"
#include "vm.h"
RUBY_SYMBOL_EXPORT_BEGIN
diff --git a/rubyparser.h b/rubyparser.h
index e15730355e..7689b974a9 100644
--- a/rubyparser.h
+++ b/rubyparser.h
@@ -327,8 +327,11 @@ typedef struct rb_ast_struct {
* Parser Interface
*/
+
typedef struct parser_params rb_parser_t;
+#ifndef INTERNAL_IMEMO_H
typedef struct rb_imemo_tmpbuf_struct rb_imemo_tmpbuf_t;
+#endif
#ifdef UNIVERSAL_PARSER
typedef struct rb_parser_config_struct {