diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-31 05:18:29 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-31 05:18:29 +0000 |
commit | 9d2accff2b2424a00b7a397711fcddf206f18cee (patch) | |
tree | 822ba431b28a7d5d79ef9b88b993e73d21cdf129 /transcode.c | |
parent | f3c43ae0c2d7ceb7d219a35e956600e0db6ebcab (diff) | |
download | ruby-9d2accff2b2424a00b7a397711fcddf206f18cee.tar.gz |
* transcode.c (econv_primitive_convert): make two arguments,
destination_byteoffset and destination_bytesize, optional.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode.c')
-rw-r--r-- | transcode.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/transcode.c b/transcode.c index 420f5752ff..d692b13d79 100644 --- a/transcode.c +++ b/transcode.c @@ -2321,6 +2321,8 @@ econv_result_to_symbol(rb_econv_result_t res) /* * call-seq: + * primitive_convert(source_buffer, destination_buffer) -> symbol + * primitive_convert(source_buffer, destination_buffer, destination_byteoffset) -> symbol * primitive_convert(source_buffer, destination_buffer, destination_byteoffset, destination_bytesize) -> symbol * primitive_convert(source_buffer, destination_buffer, destination_byteoffset, destination_bytesize, flags) -> symbol * @@ -2345,9 +2347,12 @@ econv_result_to_symbol(rb_econv_result_t res) * destination_buffer should be a string. * * destination_byteoffset should be an integer or nil. + * nil means the end of destination_buffer. + * If it is omitted, nil is assumed. * * destination_bytesize and flags should be an integer or nil. * nil means that unlimited. + * If it is omitted, nil is assumed. * * primitive_convert convert the content of source_buffer from beginning * and store the result into destination_buffer. @@ -2409,7 +2414,7 @@ econv_primitive_convert(int argc, VALUE *argv, VALUE self) unsigned long output_byteend; int flags; - rb_scan_args(argc, argv, "41", &input, &output, &output_byteoffset_v, &output_bytesize_v, &flags_v); + rb_scan_args(argc, argv, "23", &input, &output, &output_byteoffset_v, &output_bytesize_v, &flags_v); if (NIL_P(output_byteoffset_v)) output_byteoffset = 0; /* dummy */ |