nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
compiler: implement intern `init` on NativeString
[nit.git]
/
src
/
abstract_compiler.nit
diff --git
a/src/abstract_compiler.nit
b/src/abstract_compiler.nit
index
a453f6b
..
d3ca7d8
100644
(file)
--- a/
src/abstract_compiler.nit
+++ b/
src/abstract_compiler.nit
@@
-1881,6
+1881,9
@@
redef class AMethPropdef
else if pname == "atoi" then
v.ret(v.new_expr("atoi({arguments[0]});", ret.as(not null)))
return
else if pname == "atoi" then
v.ret(v.new_expr("atoi({arguments[0]});", ret.as(not null)))
return
+ else if pname == "init" then
+ v.ret(v.new_expr("(char*)nit_alloc({arguments[1]})", ret.as(not null)))
+ return
end
else if cname == "NativeArray" then
v.native_array_def(pname, ret, arguments)
end
else if cname == "NativeArray" then
v.native_array_def(pname, ret, arguments)