Re: Some fixes/improvements to libgst

Holger Freyther <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.gnu.general
Message-ID <[email protected]>
> On 30 Dec 2016, at 07:44, Lee Duhem <[email protected]> wrote:
> 
> 

Hi!

sorry for the delay.


> * byte.c (_gst_compile_bytecodes): Remove unnecessary copy.

diff --git a/libgst/byte.c b/libgst/byte.c
index 50ff07c..a90a139 100644
--- a/libgst/byte.c
+++ b/libgst/byte.c
@@ -450,9 +450,6 @@ _gst_compile_bytecodes (gst_uchar * from,

   if (free < (to - from))
     {
-      memcpy (_gst_cur_bytecodes->ptr, from, free);
-      _gst_cur_bytecodes->ptr += free;
-      from += free;
       realloc_bytecodes (_gst_cur_bytecodes,
                         BYTECODE_CHUNK_SIZE + (to - from));
     }

I think the delta is bigger than necessary? If you remove the
advancing of from, then it should be applied to the delta too?
What do you think?



> * comp.c (_gst_compile_method): Protect new created `selector' from GC
> properly.

yes! makes sense

> * gst-parse.c (expected): Call va_end.

yes! at least according to the OSX manpage.


will apply these two hunks and wait for your feedback on the
first change.

holger
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.