nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84321b8
)
lib/file: efficient write to file for FlatString
author
Jean Privat
<jean@pryen.org>
Thu, 16 Jul 2015 21:06:20 +0000
(17:06 -0400)
committer
Jean Privat
<jean@pryen.org>
Thu, 16 Jul 2015 21:06:20 +0000
(17:06 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
lib/standard/file.nit
patch
|
blob
|
history
diff --git
a/lib/standard/file.nit
b/lib/standard/file.nit
index
1d6ea43
..
b5fd854
100644
(file)
--- a/
lib/standard/file.nit
+++ b/
lib/standard/file.nit
@@
-1078,6
+1078,13
@@
redef class String
end
end
+redef class FlatString
+ redef fun write_native_to(s)
+ do
+ s.write_native(items, index_from, length)
+ end
+end
+
redef class NativeString
private fun file_exists: Bool `{
FILE *hdl = fopen(self,"r");