Merge: lib/standard/string: Added faster to_cstring method on FlatText.
authorJean Privat <jean@pryen.org>
Thu, 2 Apr 2015 16:53:11 +0000 (23:53 +0700)
committerJean Privat <jean@pryen.org>
Thu, 2 Apr 2015 16:53:11 +0000 (23:53 +0700)
Adds a service for quick cstring in `FlatTexts`, this is mainly to speedup some methods like `write_native`, which takes a cstring in input.

This just creates a new pointer to the same `char*` with an offset.

Since no copy is ever made, its use is highly discouraged in extern code or in cases other than ephemereal uses of the resulting `NativeString`.

Since it adds a new intern service, it cannot be used as is in the standard library as it will need a regeneration of c_src beforehand.

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


Trivial merge