commit/XEmacs: kehoea: Avoid make_uninit_string() for the command builder's echo_buf.

[email protected] Sun, 03 Aug 2014 19:14:14 -0000
Newsgroups gmane.emacs.xemacs.patches
Message-ID <[email protected]>
1 new commit in XEmacs:

https://bitbucket.org/xemacs/xemacs/commits/75435be92103/
Changeset:   75435be92103
User:        kehoea
Date:        2014-08-03 21:13:40
Summary:     Avoid make_uninit_string() for the command builder's echo_buf.

src/ChangeLog addition:

2014-08-03  Aidan Kehoe  <[email protected]>

	* event-stream.c (allocate_command_builder):
	* event-stream.c (Fnext_event):
	Use #'make-string rather than make_uninit_string() when allocating
	the command builder's echo_buf, avoiding having octets in the
	string that do not correspond to valid internal-format text.
Affected #:  2 files

diff -r b79e1e02bf012f32241a818847a2e9eedd5e3e96 -r 75435be92103f23d1905b4a3a60295164a9dd2b4 src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
+2014-08-03  Aidan Kehoe  <[email protected]>
+
+	* event-stream.c (allocate_command_builder):
+	* event-stream.c (Fnext_event):
+	Use #'make-string rather than make_uninit_string() when allocating
+	the command builder's echo_buf, avoiding having octets in the
+	string that do not correspond to valid internal-format text.
+
 2014-07-14  Aidan Kehoe  <[email protected]>
 
 	* event-stream.c:

diff -r b79e1e02bf012f32241a818847a2e9eedd5e3e96 -r 75435be92103f23d1905b4a3a60295164a9dd2b4 src/event-stream.c
--- a/src/event-stream.c
+++ b/src/event-stream.c
@@ -380,7 +380,8 @@
   reset_command_builder_event_chain (builder);
   if (with_echo_buf)
     {
-      builder->echo_buf = make_uninit_string (300 * MAX_ICHAR_LEN);
+      builder->echo_buf = Fmake_string (make_fixnum (300 * MAX_ICHAR_LEN),
+                                        make_char (0));
     }
   else
     {
@@ -2176,7 +2177,8 @@
       if (XSTRING_LENGTH (command_builder->echo_buf) < len)
         {
           command_builder->echo_buf
-            = make_uninit_string (len + 200 * MAX_ICHAR_LEN);
+            = Fmake_string (make_fixnum (len + 300 * MAX_ICHAR_LEN),
+                            make_char (0));
         }
 
       args[0] = command_builder->echo_buf;

Repository URL: https://bitbucket.org/xemacs/xemacs/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.