mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
forgot some checkins.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
94df732f8b
commit
1d3d27b42d
36 changed files with 2191 additions and 297 deletions
|
|
@ -47,13 +47,13 @@ static VALUE
|
|||
rb_nkf_kconv(obj, opt, src)
|
||||
VALUE obj, opt, src;
|
||||
{
|
||||
int i;
|
||||
char *opt_ptr, *opt_end;
|
||||
volatile VALUE v;
|
||||
|
||||
reinit();
|
||||
opt_ptr = str2cstr(opt, &i);
|
||||
opt_end = opt_ptr + i;
|
||||
StringValue(opt);
|
||||
opt_ptr = RSTRING(opt)->ptr;
|
||||
opt_end = opt_ptr + RSTRING(opt)->len;
|
||||
for (; opt_ptr < opt_end; opt_ptr++) {
|
||||
if (*opt_ptr != '-') {
|
||||
continue;
|
||||
|
|
@ -64,7 +64,9 @@ rb_nkf_kconv(obj, opt, src)
|
|||
incsize = INCSIZE;
|
||||
|
||||
input_ctr = 0;
|
||||
input = str2cstr(src, &i_len);
|
||||
StringValue(src);
|
||||
input = RSTRING(src)->ptr;
|
||||
i_len = RSTRING(src)->len;
|
||||
dst = rb_str_new(0, i_len*3 + 10);
|
||||
v = dst;
|
||||
|
||||
|
|
@ -96,13 +98,11 @@ rb_nkf_guess(obj, src)
|
|||
{
|
||||
unsigned char *p;
|
||||
unsigned char *pend;
|
||||
int plen;
|
||||
int sequence_counter = 0;
|
||||
|
||||
Check_Type(src, T_STRING);
|
||||
|
||||
p = str2cstr(src, &plen);
|
||||
pend = p + plen;
|
||||
StringValue(src);
|
||||
p = RSTRING(src)->ptr;
|
||||
pend = p + RSTRING(src)->len;
|
||||
|
||||
#define INCR do {\
|
||||
p++;\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue