From b2556b548104edc594b10af20982fa23bc3ce928 Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 18 Oct 2010 03:59:53 +0000 Subject: [PATCH] * pack.c (pack_pack): refine the document. [ruby-dev:42397] (pack_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ pack.c | 56 ++++++++++++++++++++++++++----------------------------- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0cba420a6a..7d7b4c237c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Oct 18 12:58:40 2010 Tanaka Akira + + * pack.c (pack_pack): refine the document. [ruby-dev:42397] + (pack_unpack): ditto. + Mon Oct 18 10:19:00 2010 NARUSE, Yui * lib/net/http.rb (transport_request): @socket may be nil. diff --git a/pack.c b/pack.c index 5d89efcaf2..5bfc6d0977 100644 --- a/pack.c +++ b/pack.c @@ -338,37 +338,19 @@ static unsigned long utf8_to_uv(const char*,long*); * i, i_, i! | Integer | signed int, native endian * l_, l! | Integer | signed long, native endian * | | - * S> | Integer | 16-bit unsigned, big endian - * L> | Integer | 32-bit unsigned, big endian - * Q> | Integer | 64-bit unsigned, big endian - * s> | Integer | 16-bit signed, big endian - * l> | Integer | 32-bit signed, big endian - * q> | Integer | 64-bit signed, big endian + * S> L> Q> | Integer | same as the directives without ">" except + * s> l> q> | | big endian + * S!> I!> | | (available since Ruby 1.9.3) + * L!> Q!> | | "S>" is same as "n" + * s!> i!> | | "L>" is same as "N" + * l!> q!> | | * | | - * S< | Integer | 16-bit unsigned, little endian - * L< | Integer | 32-bit unsigned, little endian - * Q< | Integer | 64-bit unsigned, little endian - * s< | Integer | 16-bit signed, little endian - * l< | Integer | 32-bit signed, little endian - * q< | Integer | 64-bit signed, little endian - * | | - * S!> | Integer | unsigned short, big endian - * I!> | Integer | unsigned int, big endian - * L!> | Integer | unsigned long, big endian - * Q!> | Integer | unsigned long long, big endian - * s!> | Integer | signed, big endian - * i!> | Integer | signed int, big endian - * l!> | Integer | signed, big endian - * q!> | Integer | signed, big endian - * | | - * S!< | Integer | unsigned short, little endian - * I!< | Integer | unsigned int, little endian - * L!< | Integer | unsigned long, little endian - * Q!< | Integer | unsigned long long, little endian - * s!< | Integer | signed short, little endian - * i!< | Integer | signed int, little endian - * l!< | Integer | signed long, little endian - * q!< | Integer | signed long long, little endian + * S< L< Q< | Integer | same as the directives without "<" except + * s< l< q< | | little endian + * S!< I!< | | (available since Ruby 1.9.3) + * L!< Q!< | | "S<" is same as "v" + * s!< i!< | | "L<" is same as "V" + * l!< q!< | | * | | * n | Integer | 16-bit unsigned, network (big-endian) byte order * N | Integer | 32-bit unsigned, network (big-endian) byte order @@ -1308,6 +1290,20 @@ infected_str_new(const char *ptr, long len, VALUE str) * i, i_, i! | Integer | signed int, native endian * l_, l! | Integer | signed long, native endian * | | + * S> L> Q> | Integer | same as the directives without ">" except + * s> l> q> | | big endian + * S!> I!> | | (available since Ruby 1.9.3) + * L!> Q!> | | "S>" is same as "n" + * s!> i!> | | "L>" is same as "N" + * l!> q!> | | + * | | + * S< L< Q< | Integer | same as the directives without "<" except + * s< l< q< | | little endian + * S!< I!< | | (available since Ruby 1.9.3) + * L!< Q!< | | "S<" is same as "v" + * s!< i!< | | "L<" is same as "V" + * l!< q!< | | + * | | * n | Integer | 16-bit unsigned, network (big-endian) byte order * N | Integer | 32-bit unsigned, network (big-endian) byte order * v | Integer | 16-bit unsigned, VAX (little-endian) byte order