nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b4525f
)
compiler: implement intern `init` on NativeString
author
Jean Privat
<jean@pryen.org>
Thu, 12 Jun 2014 14:17:39 +0000
(10:17 -0400)
committer
Jean Privat
<jean@pryen.org>
Thu, 12 Jun 2014 14:17:39 +0000
(10:17 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
src/abstract_compiler.nit
patch
|
blob
|
history
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 == "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)