Avoid calling `u32_conv_from_encoding' on the null string
authorMark H Weaver <mhw@netris.org>
Tue, 10 Jan 2012 11:18:31 +0000 (06:18 -0500)
committerMark H Weaver <mhw@netris.org>
Tue, 10 Jan 2012 11:33:17 +0000 (06:33 -0500)
commit7532125912a381c0770aa7af596b7401942c685b
tree897166ebe135276506d28628c4c137570afb5052
parent3248c954dbd67a2abb67ffbc470feaeb8c8dd0d3
Avoid calling `u32_conv_from_encoding' on the null string

* libguile/strings.c (scm_from_stringn): Avoid calling
  `u32_conv_from_encoding' on the null string, by using the same
  fast-path code used if (encoding == NULL).  This is an optimization,
  and also avoids any possible encoding errors.
libguile/strings.c