Ruby  1.9.3p448(2013-06-27revision41675)
modify.c
Go to the documentation of this file.
1 #include "ruby.h"
2 
3 VALUE
5 {
6  rb_str_modify(str);
7  return str;
8 }
9 
10 VALUE
12 {
13  rb_str_modify_expand(str, NUM2LONG(expand));
14  return str;
15 }
16 
17 void
19 {
20  rb_define_method(klass, "modify!", bug_str_modify, 0);
21  rb_define_method(klass, "modify_expand!", bug_str_modify_expand, 1);
22 }
VALUE bug_str_modify(VALUE str)
Definition: modify.c:4
static long NUM2LONG(VALUE x)
Definition: ruby.h:510
VALUE bug_str_modify_expand(VALUE str, VALUE expand)
Definition: modify.c:11
void Init_modify(VALUE klass)
Definition: modify.c:18
void rb_str_modify_expand(VALUE, long)
Definition: string.c:1327
unsigned long VALUE
Definition: ruby.h:88
void rb_str_modify(VALUE)
Definition: string.c:1319
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
Definition: class.c:1209