summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenta Murata <mrkn@mrkn.jp>2020-09-25 21:32:00 +0900
committerKenta Murata <mrkn@mrkn.jp>2020-09-25 21:32:00 +0900
commitc04c34df4719db65366f70cdc2b7d9caa0602e21 (patch)
treec4e4c03b8a53bd68f74047ec7b9b32bdc65f498c
parent56012d2f7ef163d6c1f87324c749018cc9079c31 (diff)
memory_view.h: brush up the description in the comment
-rw-r--r--include/ruby/memory_view.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/ruby/memory_view.h b/include/ruby/memory_view.h
index dc6c971593..5d48c359c1 100644
--- a/include/ruby/memory_view.h
+++ b/include/ruby/memory_view.h
@@ -54,8 +54,8 @@ typedef struct {
/* A string to describe the format of an element, or NULL for unsigned byte.
* The format string is a sequence the following pack-template specifiers:
*
- * c, C, s, s!, S, S!, n, v, i, i!, I, I!, l, l!,
- * L, L!, N, V, f, e, g, d, E, G, j, J, x
+ * c, C, s, s!, S, S!, n, v, i, i!, I, I!, l, l!, L, L!,
+ * N, V, f, e, g, q, q!, Q, Q!, d, E, G, j, J, x
*
* For example, "dd" for an element that consists of two double values,
* and "CCC" for an element that consists of three bytes, such as
@@ -63,6 +63,11 @@ typedef struct {
*
* Also, the value endianness can be explicitly specified by '<' or '>'
* following a value type specifier.
+ *
+ * The items are packed contiguously. When you emulate the alignment of
+ * structure members, put '|' at the beginning of the format string,
+ * like "|iqc". On x86_64 Linux ABI, the size of the item by this format
+ * is 24 bytes instead of 13 bytes.
*/
const char *format;