emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lispref/processes.texi


From: Thien-Thi Nguyen
Subject: [Emacs-diffs] Changes to emacs/lispref/processes.texi
Date: Sat, 27 May 2006 00:48:28 +0000

Index: emacs/lispref/processes.texi
diff -u emacs/lispref/processes.texi:1.78 emacs/lispref/processes.texi:1.79
--- emacs/lispref/processes.texi:1.78   Thu May 25 09:01:43 2006
+++ emacs/lispref/processes.texi        Sat May 27 00:48:28 2006
@@ -2268,10 +2268,17 @@
 @code{a}.  (This corresponds to @code{struct.a.b[2].c} in C.)
 @end defun
 
+  Although packing and unpacking operations change the organization of
+data (in memory), they preserve the data's @dfn{total length}, which is
+the sum of all the fields' lengths, in bytes.  This value is not
+generally inherent in either the specification or alist alone; instead,
+both pieces of information contribute to its calculation.  Likewise, the
+length of a string or array being unpacked may be longer than the data's
+total length as described by the specification.
+
 @defun bindat-length spec struct
address@hidden ??? I don't understand this at all -- rms
-This function returns the length in bytes of @var{struct}, according
-to @var{spec}.
+This function returns the total length of the data in @var{struct},
+according to @var{spec}.
 @end defun
 
 @defun bindat-pack spec struct &optional raw-data pos
@@ -2281,6 +2288,9 @@
 is address@hidden, it specifies a pre-allocated unibyte string or vector to
 pack into.  If @var{pos} is address@hidden, it specifies the starting
 offset for packing into @code{raw-data}.
+
+When pre-allocating, you should make sure @code{(length @var{raw-data})}
+meets or exceeds the total length to avoid an out-of-range error.
 @end defun
 
 @defun bindat-ip-to-string ip




reply via email to

[Prev in Thread] Current Thread [Next in Thread]