root/ext/-test-/exception/enc_raise.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. enc_raise
  2. Init_enc_raise

#include <ruby.h>
#include <ruby/encoding.h>

static VALUE
enc_raise(VALUE exc, VALUE encoding, VALUE mesg)
{
    rb_enc_raise(rb_to_encoding(encoding), exc, "%s", StringValueCStr(mesg));
    UNREACHABLE;
}

void
Init_enc_raise(VALUE klass)
{
    rb_define_module_function(klass, "enc_raise", enc_raise, 2);
}

/* [previous][next][first][last][top][bottom][index][help] */