nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge: lib: intro the matrix package
[nit.git]
/
src
/
nitni
/
nitni_utilities.nit
diff --git
a/src/nitni/nitni_utilities.nit
b/src/nitni/nitni_utilities.nit
index
5c5b9c1
..
7de8053
100644
(file)
--- a/
src/nitni/nitni_utilities.nit
+++ b/
src/nitni/nitni_utilities.nit
@@
-72,7
+72,7
@@
redef class MMethod
var cparams = new List[String]
if not self.is_init then
var cparams = new List[String]
if not self.is_init then
- cparams.add( "{call_context.name_mtype(recv_mtype)} recv" )
+ cparams.add( "{call_context.name_mtype(recv_mtype)} self" )
end
for p in signature.mparameters do
var param_mtype = p.mtype.resolve_for(recv_mtype, recv_mtype, from_mmodule, true)
end
for p in signature.mparameters do
var param_mtype = p.mtype.resolve_for(recv_mtype, recv_mtype, from_mmodule, true)
@@
-103,13
+103,14
@@
redef class MMethod
return_mtype = recv_mtype
else if signature.return_mtype != null then
return_mtype = signature.return_mtype
return_mtype = recv_mtype
else if signature.return_mtype != null then
return_mtype = signature.return_mtype
+ return_mtype = return_mtype.resolve_for(recv_mtype, recv_mtype, from_mmodule, true)
end
var cname = build_cname(recv_mtype, from_mmodule, suffix, length)
var cparams = new List[String]
if not self.is_init then
end
var cname = build_cname(recv_mtype, from_mmodule, suffix, length)
var cparams = new List[String]
if not self.is_init then
- cparams.add(call_context.cast_to(recv_mtype, "recv{param_suffix}"))
+ cparams.add(call_context.cast_to(recv_mtype, "self{param_suffix}"))
end
for p in signature.mparameters do
end
for p in signature.mparameters do
@@
-149,5
+150,6
@@
end
# Length of the signature of a C function (long version hase the module name as prefix)
class SignatureLength
private var long: Bool
# Length of the signature of a C function (long version hase the module name as prefix)
class SignatureLength
private var long: Bool
- private init(long: Bool) do self.long = long
+
+ # TODO: private init because singleton class.
end
end