From 90548ea5c4714a52921bf8f39a14da462492f22a Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Wed, 2 Apr 2014 09:51:24 -0400 Subject: [PATCH] nitg: use ctype instead of cname_blind in autobox I am not sure of why `cname_blind` was used originally. If the point is just to allow unsafe pointer substitution, then `ctype` should be enough. Signed-off-by: Jean Privat --- src/global_compiler.nit | 2 +- src/separate_compiler.nit | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/global_compiler.nit b/src/global_compiler.nit index a85f889..1a3d2c1 100644 --- a/src/global_compiler.nit +++ b/src/global_compiler.nit @@ -274,7 +274,7 @@ class GlobalCompilerVisitor end self.add("{res} = BOX_{valtype.c_name}({value}); /* autobox from {value.mtype} to {mtype} */") return res - else if value.mtype.cname_blind == "void*" and mtype.cname_blind == "void*" then + else if value.mtype.ctype == "void*" and mtype.ctype == "void*" then return value else # Bad things will appen! diff --git a/src/separate_compiler.nit b/src/separate_compiler.nit index 2352646..511ac15 100644 --- a/src/separate_compiler.nit +++ b/src/separate_compiler.nit @@ -965,7 +965,7 @@ class SeparateCompilerVisitor self.require_declaration("BOX_{valtype.c_name}") self.add("{res} = BOX_{valtype.c_name}({value}); /* autobox from {value.mtype} to {mtype} */") return res - else if value.mtype.cname_blind == "void*" and mtype.cname_blind == "void*" then + else if value.mtype.ctype == "void*" and mtype.ctype == "void*" then return value else # Bad things will appen! -- 1.7.9.5