summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-13 23:45:31 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-13 23:45:31 +0000
commit6e1e9ec8dbf90afc6d3c0ae4281f1d9468b700bf (patch)
treeaf8d4e3a5ad784615ac5db2b8db220e04eebd147
parent34856193be71c7f7605838a7cd22ec8d6aee5ae5 (diff)
downloadruby-6e1e9ec8dbf90afc6d3c0ae4281f1d9468b700bf.tar.gz
ruby-6e1e9ec8dbf90afc6d3c0ae4281f1d9468b700bf.tar.xz
ruby-6e1e9ec8dbf90afc6d3c0ae4281f1d9468b700bf.zip
rdoc updated.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--transcode.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/transcode.c b/transcode.c
index 1bdcf9bab..36918e29f 100644
--- a/transcode.c
+++ b/transcode.c
@@ -1430,8 +1430,8 @@ check_econv(VALUE self)
/*
* call-seq:
- * primitive_convert(input_buffer, output_buffer, output_bufsize) -> symbol
- * primitive_convert(input_buffer, output_buffer, output_bufsize, flags) -> symbol
+ * primitive_convert(input_buffer, output_buffer, output_byteoffset, output_bytesize) -> symbol
+ * primitive_convert(input_buffer, output_buffer, output_byteoffset, output_bytesize, flags) -> symbol
*
* possible flags:
* Encoding::Converter::PARTIAL_INPUT # input buffer may be part of larger input
@@ -1446,17 +1446,24 @@ check_econv(VALUE self)
* primitive_convert converts input_buffer into output_buffer.
*
* input_buffer and output_buffer should be a string.
- * output_bufsize and flags should be an integer.
+ * output_byteoffset should be an integer or nil.
+ * output_bytesize and flags should be an integer.
*
* primitive_convert convert the content of input_buffer from beginning
* and store the result into output_buffer.
*
+ * output_byteoffset and output_bytesize specify the region which
+ * the converted result is stored.
+ * output_byteoffset specifies the start position in output_buffer in bytes.
+ * If output_byteoffset is nil, output_buffer.bytesize is assumed.
+ * output_bytesize specifies maximum number of bytes.
+ * After conversion, output_buffer is resized to
+ * output_byteoffset + actually converted number of bytes.
+ *
* primitive_convert drops the first part of input_buffer.
* the dropped part is converted in output_buffer or
* buffered in Encoding::Converter object.
*
- * output_buffer is resized to output_bufsize bytes at maximum.
- *
* primitive_convert stops conversion when one of following condition met.
* - invalid byte sequence found in input buffer (:invalid_input)
* - character not representable in output encoding (:undefined_conversion)