From 9bf9de3d9d2f67bc401151fb94abf75b5eff5913 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 17 Dec 2019 14:52:15 +0900 Subject: Made the warning for deprecated constants follow the category flag --- internal.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'internal.h') diff --git a/internal.h b/internal.h index c35e3bdb6f..fc2ff0eaff 100644 --- a/internal.h +++ b/internal.h @@ -1554,6 +1554,13 @@ PRINTF_ARGS(void rb_sys_enc_warning(rb_encoding *enc, const char *fmt, ...), 2, PRINTF_ARGS(void rb_syserr_enc_warning(int err, rb_encoding *enc, const char *fmt, ...), 3, 4); #endif +typedef enum { + RB_WARN_CATEGORY_NONE, + RB_WARN_CATEGORY_DEPRECATED, +} rb_warning_category_t; +rb_warning_category_t rb_warning_category_from_name(VALUE category); +bool rb_warning_category_enabled_p(rb_warning_category_t category); + #define rb_raise_cstr(etype, mesg) \ rb_exc_raise(rb_exc_new_str(etype, rb_str_new_cstr(mesg))) #define rb_raise_static(etype, mesg) \ -- cgit v1.2.3