From 4cdb055925de27b5b2aa71b1f8ebef045f9522d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Emin=20=C4=B0NA=C3=87?= Date: Mon, 24 Feb 2025 17:55:46 +0100 Subject: [PATCH] Expose `oj_parser_type` for extensions (#958) --- ext/oj/parser.c | 2 +- ext/oj/parser.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/oj/parser.c b/ext/oj/parser.c index af7aabb9..1aad763c 100644 --- a/ext/oj/parser.c +++ b/ext/oj/parser.c @@ -1161,7 +1161,7 @@ static void parser_mark(void *ptr) { } } -static const rb_data_type_t oj_parser_type = { +const rb_data_type_t oj_parser_type = { "Oj/parser", { parser_mark, diff --git a/ext/oj/parser.h b/ext/oj/parser.h index 76b58db6..5f3ecba2 100644 --- a/ext/oj/parser.h +++ b/ext/oj/parser.h @@ -42,6 +42,8 @@ typedef struct _num { struct _ojParser; +extern const rb_data_type_t oj_parser_type; + typedef struct _funcs { void (*add_null)(struct _ojParser *p); void (*add_true)(struct _ojParser *p);