Ruby
1.9.3p448(2013-06-27revision41675)
Main Page
Modules
Data Structures
Files
File List
Globals
ext
-test-
string
enc_associate.c
Go to the documentation of this file.
1
#include "ruby.h"
2
#include "
ruby/encoding.h
"
3
4
VALUE
5
bug_str_enc_associate
(
VALUE
str,
VALUE
enc)
6
{
7
return
rb_enc_associate
(str,
rb_to_encoding
(enc));
8
}
9
10
void
11
Init_enc_associate
(
VALUE
klass)
12
{
13
rb_define_method
(klass,
"associate_encoding!"
,
bug_str_enc_associate
, 1);
14
}
rb_to_encoding
rb_encoding * rb_to_encoding(VALUE enc)
Definition:
encoding.c:179
rb_enc_associate
VALUE rb_enc_associate(VALUE obj, rb_encoding *enc)
Definition:
encoding.c:727
bug_str_enc_associate
VALUE bug_str_enc_associate(VALUE str, VALUE enc)
Definition:
enc_associate.c:5
encoding.h
VALUE
unsigned long VALUE
Definition:
ruby.h:88
rb_define_method
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
Definition:
class.c:1209
Init_enc_associate
void Init_enc_associate(VALUE klass)
Definition:
enc_associate.c:11
Generated on Thu Jul 31 2014 19:14:04 for Ruby by
1.8.7