nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
model: intro `MModule::first_real_mmodule` to get the first non-fictive module
[nit.git]
/
lib
/
cpp.nit
diff --git
a/lib/cpp.nit
b/lib/cpp.nit
index
bd113dd
..
78bb96c
100644
(file)
--- a/
lib/cpp.nit
+++ b/
lib/cpp.nit
@@
-16,7
+16,7
@@
# Offers features to interface with C++ code and libraries
module cpp is
# 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
end
# A pointer to a C++ std::string instance
@@
-25,12
+25,12
@@
end
redef class Text
# Get `self` as a `CppString`
redef class Text
# Get `self` as a `CppString`
- fun to_cpp_string: CppString do return to_cstring.to_cpp_string
+ fun to_cpp_string: CppString do return to_cstring.to_cpp_string(length)
end
redef class NativeString
# Get `self` as a `CppString`
end
redef class NativeString
# Get `self` as a `CppString`
- fun to_cpp_string: CppString in "C++" `{
- return new std::string(recv);
+ fun to_cpp_string(length: Int): CppString in "C++" `{
+ return new std::string(recv, length);
`}
end
`}
end