Project

General

Profile

Feature #5650 ยป rb_enc_raise.patch

now (Nikolai Weibull), 11/20/2011 03:33 AM

View differences:

error.c
1661 1661
}
1662 1662

  
1663 1663
void
1664
rb_enc_raise(rb_encoding *enc, VALUE exc, const char *fmt, ...)
1665
{
1666
    va_list args;
1667
    VALUE mesg;
1668

  
1669
    va_start(args, fmt);
1670
    mesg = rb_enc_vsprintf(enc, fmt, args);
1671
    va_end(args);
1672

  
1673
    rb_exc_raise(rb_exc_new3(exc, mesg));
1674
}
1675

  
1676
void
1664 1677
rb_raise(VALUE exc, const char *fmt, ...)
1665 1678
{
1666 1679
    va_list args;
include/ruby/encoding.h
111 111
VALUE rb_str_conv_enc(VALUE str, rb_encoding *from, rb_encoding *to);
112 112
VALUE rb_str_conv_enc_opts(VALUE str, rb_encoding *from, rb_encoding *to, int ecflags, VALUE ecopts);
113 113

  
114
PRINTF_ARGS(NORETURN(void rb_enc_raise(rb_encoding *, VALUE, const char*, ...)), 3, 4);
115

  
114 116
/* index -> rb_encoding */
115 117
rb_encoding* rb_enc_from_index(int idx);
116 118