nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
048373d
)
lib/cpp: add missing doc
author
Alexis Laferrière
<alexis.laf@xymus.net>
Wed, 26 Nov 2014 16:45:43 +0000
(11:45 -0500)
committer
Alexis Laferrière
<alexis.laf@xymus.net>
Thu, 27 Nov 2014 15:12:33 +0000
(10:12 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/cpp.nit
patch
|
blob
|
history
diff --git
a/lib/cpp.nit
b/lib/cpp.nit
index
4eeb2a5
..
bd113dd
100644
(file)
--- a/
lib/cpp.nit
+++ b/
lib/cpp.nit
@@
-24,10
+24,12
@@
extern class CppString in "C++" `{ std::string* `}
end
redef class Text
+ # Get `self` as a `CppString`
fun to_cpp_string: CppString do return to_cstring.to_cpp_string
end
redef class NativeString
+ # Get `self` as a `CppString`
fun to_cpp_string: CppString in "C++" `{
return new std::string(recv);
`}