mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-04-24 09:08:44 +02:00
ruby: update rdoc
This commit is contained in:
parent
d0af8aa9f1
commit
dbebe9771b
@ -59,7 +59,6 @@ static ID s_append;
|
||||
* nil.to_msgpack(out = '') -> String
|
||||
*
|
||||
* Serializes the nil into raw bytes.
|
||||
* This calls to_msgpack reflectively for internal elements.
|
||||
*/
|
||||
static VALUE MessagePack_NilClass_to_msgpack(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
@ -76,7 +75,6 @@ static VALUE MessagePack_NilClass_to_msgpack(int argc, VALUE *argv, VALUE self)
|
||||
* true.to_msgpack(out = '') -> String
|
||||
*
|
||||
* Serializes the true into raw bytes.
|
||||
* This calls to_msgpack reflectively for internal elements.
|
||||
*/
|
||||
static VALUE MessagePack_TrueClass_to_msgpack(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
@ -93,7 +91,6 @@ static VALUE MessagePack_TrueClass_to_msgpack(int argc, VALUE *argv, VALUE self)
|
||||
* false.to_msgpack(out = '') -> String
|
||||
*
|
||||
* Serializes false into raw bytes.
|
||||
* This calls to_msgpack reflectively for internal elements.
|
||||
*/
|
||||
static VALUE MessagePack_FalseClass_to_msgpack(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
@ -110,7 +107,6 @@ static VALUE MessagePack_FalseClass_to_msgpack(int argc, VALUE *argv, VALUE self
|
||||
* fixnum.to_msgpack(out = '') -> String
|
||||
*
|
||||
* Serializes the Fixnum into raw bytes.
|
||||
* This calls to_msgpack reflectively for internal elements.
|
||||
*/
|
||||
static VALUE MessagePack_Fixnum_to_msgpack(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
@ -131,7 +127,6 @@ static VALUE MessagePack_Fixnum_to_msgpack(int argc, VALUE *argv, VALUE self)
|
||||
* bignum.to_msgpack(out = '') -> String
|
||||
*
|
||||
* Serializes the Bignum into raw bytes.
|
||||
* This calls to_msgpack reflectively for internal elements.
|
||||
*/
|
||||
static VALUE MessagePack_Bignum_to_msgpack(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
|
@ -27,10 +27,18 @@ static VALUE mMessagePack;
|
||||
* It enables to exchange structured objects between many languages like JSON.
|
||||
* But unlike JSON, it is very fast and small.
|
||||
*
|
||||
* You can install MessagePack with rubygems.
|
||||
*
|
||||
* gem install msgpack
|
||||
*
|
||||
* Simple usage is as follows.
|
||||
*
|
||||
* require 'msgpack'
|
||||
* msg = [1,2,3].to_msgpack #=> "\x93\x01\x02\x03"
|
||||
* MessagePack.unpack(msg) #=> [1,2,3]
|
||||
*
|
||||
* Use Unpacker class for streaming deserialization.
|
||||
*
|
||||
*/
|
||||
void Init_msgpack(void)
|
||||
{
|
||||
|
@ -654,7 +654,7 @@ void Init_msgpack_unpack(VALUE mMessagePack)
|
||||
* Following code uses Buffered API with an input stream:
|
||||
*
|
||||
* # create an unpacker with input stream.
|
||||
* pac = MessagePack::Unpacker.new(stdin)
|
||||
* pac = MessagePack::Unpacker.new(STDIN)
|
||||
*
|
||||
* # deserialize object one after another.
|
||||
* pac.each {|obj|
|
||||
@ -663,8 +663,8 @@ void Init_msgpack_unpack(VALUE mMessagePack)
|
||||
*
|
||||
*
|
||||
* Following code doesn't use the input stream and feeds buffer
|
||||
* using *fill* method. This is useful to use special stream
|
||||
* or with event-driven I/O library.
|
||||
* manually. This is useful to use special stream or with
|
||||
* event-driven I/O library.
|
||||
*
|
||||
* # create an unpacker without input stream.
|
||||
* pac = MessagePack::Unpacker.new()
|
||||
@ -677,6 +677,7 @@ void Init_msgpack_unpack(VALUE mMessagePack)
|
||||
* # ...
|
||||
* }
|
||||
*
|
||||
*
|
||||
* You can manage the buffer manually with the combination of
|
||||
* *execute*, *finished?*, *data* and *reset* method.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user