1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* error.c (Init_syserr): moved function definition itself from

template/known_errors.inc.tmpl.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-11-18 17:39:33 +00:00
parent 2d549dcfbd
commit 1da55b38fa
3 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Wed Nov 19 02:39:31 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* error.c (Init_syserr): moved function definition itself from
template/known_errors.inc.tmpl.
Wed Nov 19 01:10:52 2008 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp> Wed Nov 19 01:10:52 2008 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
* lib/drb/drb.rb (DRbConn::alive?): fixed NoMethodError problem * lib/drb/drb.rb (DRbConn::alive?): fixed NoMethodError problem

View file

@ -1157,7 +1157,11 @@ rb_check_frozen(VALUE obj)
if (OBJ_FROZEN(obj)) rb_error_frozen(rb_obj_classname(obj)); if (OBJ_FROZEN(obj)) rb_error_frozen(rb_obj_classname(obj));
} }
void Init_syserr(void)
{
rb_eNOERROR = set_syserr(0, "NOERROR");
#include "known_errors.inc" #include "known_errors.inc"
}
static void static void
err_append(const char *s) err_append(const char *s)

View file

@ -5,8 +5,6 @@
*/ */
% error_names = ARGF.read.split(/\s+/) % error_names = ARGF.read.split(/\s+/)
void Init_syserr(void) {
rb_eNOERROR = set_syserr(0, "NOERROR");
% error_names.each do |name| % error_names.each do |name|
#ifdef <%=name%> #ifdef <%=name%>
set_syserr(<%=name%>, "<%=name%>"); set_syserr(<%=name%>, "<%=name%>");
@ -14,4 +12,3 @@ void Init_syserr(void) {
set_syserr(0, "<%=name%>"); set_syserr(0, "<%=name%>");
#endif #endif
% end % end
}