From 955a38da08b64a1c4092f6f8cc3527ce50598092 Mon Sep 17 00:00:00 2001 From: ko1 Date: Wed, 16 Oct 2013 08:39:39 +0000 Subject: * error.c, internal.h (rb_bug_reporter_add): add a new C-API. rb_bug_reporter_add() allows to register a function which is called at rb_bug() called. * ext/-test-/bug_reporter/bug_reporter.c: add a test for this C-API. * ext/-test-/bug_reporter/extconf.rb: ditto. * test/-ext-/bug_reporter/test_bug_reporter.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- internal.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal.h') diff --git a/internal.h b/internal.h index 403b91bade..c1890961c3 100644 --- a/internal.h +++ b/internal.h @@ -772,6 +772,9 @@ VALUE rb_big2str_gmp(VALUE x, int base); VALUE rb_str2big_gmp(VALUE arg, int base, int badcheck); #endif +/* error.c */ +int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data); + /* file.c */ #ifdef __APPLE__ VALUE rb_str_normalize_ospath(const char *ptr, long len); -- cgit v1.2.3