Implement rb_bug_without_die
This commit is contained in:
parent
c0caf1cc1a
commit
ca2d19d4e5
Notes:
git
2024-12-12 19:08:15 +00:00
13
error.c
13
error.c
@ -1085,7 +1085,7 @@ die(void)
|
|||||||
|
|
||||||
RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 1, 0)
|
RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 1, 0)
|
||||||
static void
|
static void
|
||||||
rb_bug_without_die(const char *fmt, va_list args)
|
rb_bug_without_die_internal(const char *fmt, va_list args)
|
||||||
{
|
{
|
||||||
const char *file = NULL;
|
const char *file = NULL;
|
||||||
int line = 0;
|
int line = 0;
|
||||||
@ -1097,12 +1097,21 @@ rb_bug_without_die(const char *fmt, va_list args)
|
|||||||
report_bug_valist(file, line, fmt, NULL, args);
|
report_bug_valist(file, line, fmt, NULL, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
rb_bug_without_die(const char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
va_start(args, fmt);
|
||||||
|
rb_bug_without_die_internal(fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
rb_bug(const char *fmt, ...)
|
rb_bug(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
rb_bug_without_die(fmt, args);
|
rb_bug_without_die_internal(fmt, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
@ -185,6 +185,7 @@ NORETURN(static inline void rb_key_err_raise(VALUE mesg, VALUE recv, VALUE name)
|
|||||||
static inline void Check_Type(VALUE v, enum ruby_value_type t);
|
static inline void Check_Type(VALUE v, enum ruby_value_type t);
|
||||||
static inline bool rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type);
|
static inline bool rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type);
|
||||||
#define rb_typeddata_is_instance_of rb_typeddata_is_instance_of_inline
|
#define rb_typeddata_is_instance_of rb_typeddata_is_instance_of_inline
|
||||||
|
void rb_bug_without_die(const char *fmt, ...);
|
||||||
|
|
||||||
RUBY_SYMBOL_EXPORT_BEGIN
|
RUBY_SYMBOL_EXPORT_BEGIN
|
||||||
/* error.c (export) */
|
/* error.c (export) */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user