nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge: Rename Streams
[nit.git]
/
lib
/
standard
/
time.nit
diff --git
a/lib/standard/time.nit
b/lib/standard/time.nit
index
09e8389
..
e0b3867
100644
(file)
--- a/
lib/standard/time.nit
+++ b/
lib/standard/time.nit
@@
-135,7
+135,9
@@
extern class Tm `{struct tm *`}
c_format = String_to_cstring(format);
res = strftime(buf, 100, c_format, recv);
- return NativeString_to_s(buf);
+ String s = NativeString_to_s_with_copy(buf);
+ free(buf);
+ return s;
`}
redef fun to_s do return asctime.replace("\n", "")