abstract_compiler: introduce root_compile_dir for platforms that need them
[nit.git] / lib / cpp.nit
index 6fe897a..a2896d3 100644 (file)
@@ -16,7 +16,7 @@
 
 # Offers features to interface with C++ code and libraries
 module cpp is
-       new_annotation cpp_compiler_option
+       new_annotation cppflags
 end
 
 # A pointer to a C++ std::string instance
@@ -31,6 +31,6 @@ end
 redef class NativeString
        # Get `self` as a `CppString`
        fun to_cpp_string(length: Int): CppString in "C++" `{
-               return new std::string(recv, length);
+               return new std::string(self, length);
        `}
 end