Merge: Rename the extern class `NativeString` to `CString`
authorJean Privat <jean@pryen.org>
Fri, 30 Dec 2016 20:27:19 +0000 (15:27 -0500)
committerJean Privat <jean@pryen.org>
Fri, 30 Dec 2016 20:27:19 +0000 (15:27 -0500)
`NativeString` used to be mainly implemented by the engines, but in the last few years it became gradually a normal extern class. As such, its instances are now C strings (`char *`). Most of its methods are extern and implemented in the library instead of the engines. It is also widely used by extern methods implemented in C as `char *`, the type appears 300+ times in the general lib and 67 times in `lib/core/text`.

This PR renames `NativeString` to `CString`. This change makes it clear to beginner programmers that its instances are pointers to C strings and how they are passed to C code. Plus, it fits better next to `CppString`, `JavaString` and `NSString`.

The only remaining engine not using it as a C string is the Java compiler, which implements it as a Java string. This still works and as long as it behaves like a C string there is no problem.

This PR also updates the related doc and attempts to update all indirect references to the new `CString`.

As discussed with @privat and @R4PaSs.

Pull-Request: #2347
Reviewed-by: Jean Privat <jean@pryen.org>

1  2 
lib/core/bytes.nit
lib/core/text/abstract_text.nit
lib/mongodb/mongodb.nit

Simple merge
Simple merge
Simple merge