Merge: String memory fixes
authorJean Privat <jean@pryen.org>
Fri, 6 Feb 2015 01:14:19 +0000 (08:14 +0700)
committerJean Privat <jean@pryen.org>
Fri, 6 Feb 2015 01:14:19 +0000 (08:14 +0700)
commite61c0afcb7cb09fe9542de355783a53c9ae0c46d
tree363d8a15605670a9dba387d058d2c4a7fd49fde7
parent0dc7c7d8127e4f889f98568323ef83d8ebf2b066
parent946bbe647cb3bebbf46d41e2bcba6934744b59d9
Merge: String memory fixes

Another step towards the closure of #1106 and #69, this PR removes several calls to `malloc` in `lib/standard` C code and replaces them by some of the solutions proposed in #1106 to handle the allocation of Strings.

@xymus: Your review is more than welcome since we're dealing with extern code, it might be a good time to specify and document how to properly allocate extern data structures to avoid leaking code such as the ones we had.

Pull-Request: #1140
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Jean Privat <jean@pryen.org>
lib/standard/string.nit