nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge: new `with` statement
[nit.git]
/
src
/
interpreter
/
naive_interpreter.nit
diff --git
a/src/interpreter/naive_interpreter.nit
b/src/interpreter/naive_interpreter.nit
index
21118ab
..
272219f
100644
(file)
--- a/
src/interpreter/naive_interpreter.nit
+++ b/
src/interpreter/naive_interpreter.nit
@@
-1016,6
+1016,9
@@
redef class AMethPropdef
return v.int_instance(res)
else if pname == "atof" then
return v.float_instance(recvval.to_f)
return v.int_instance(res)
else if pname == "atof" then
return v.float_instance(recvval.to_f)
+ else if pname == "fast_cstring" then
+ var ns = recvval.to_cstring.to_s.substring_from(args[1].to_i)
+ return v.native_string_instance(ns)
end
else if cname == "String" then
var cs = v.send(v.force_get_primitive_method("to_cstring", args.first.mtype), [args.first])
end
else if cname == "String" then
var cs = v.send(v.force_get_primitive_method("to_cstring", args.first.mtype), [args.first])