Have `scm_scan_for_encoding ()' use GC-managed memory.
authorLudovic Courtès <ludo@gnu.org>
Sat, 14 Nov 2009 15:27:28 +0000 (16:27 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sat, 14 Nov 2009 15:59:25 +0000 (16:59 +0100)
commitf8a1c9a8594d5c64cd8b0dfada16ece6dcfe13f4
treecb443399593c196d3baa0e0ba807cc2b3305dc98
parentd6a6989e08a84cbf3c6b11c199536f665cbb6b50
Have `scm_scan_for_encoding ()' use GC-managed memory.

* libguile/read.c (scm_scan_for_encoding): Rename to ...
  (scm_i_scan_for_encoding): ... this; update callers.  Use
  `scm_gc_strndup ()' instead of `scm_malloc ()'.

* libguile/read.h: Update accordingly.

* libguile/load.c (scm_primitive_load): Don't call free(3) on the value
  returned by `scm_i_scan_for_encoding ()'.
libguile/load.c
libguile/read.c
libguile/read.h