File src/misc.c changed (mode: 100644) (index b32b715..c644e0a) |
... |
... |
int canconvert(const struct typenode *ufrom, const struct typenode *uto) |
225 |
225 |
if (from->typename == NULL || to->typename == NULL) return 0; |
if (from->typename == NULL || to->typename == NULL) return 0; |
226 |
226 |
from = getPrimitiveAncestor(from); |
from = getPrimitiveAncestor(from); |
227 |
227 |
to = getPrimitiveAncestor(to); |
to = getPrimitiveAncestor(to); |
228 |
|
if (from == gNull && to == gHandle) |
|
|
228 |
|
if (from == gNull && (to == gHandle || to == gString || to == gCode)) |
229 |
229 |
return 1; |
return 1; |
230 |
230 |
if ((from == gInteger || from == gReal) && |
if ((from == gInteger || from == gReal) && |
231 |
231 |
(to == gInteger || to == gReal)) |
(to == gInteger || to == gReal)) |
|
... |
... |
void checkcomparison(const struct typenode *a, const struct typenode *b) |
264 |
264 |
const struct typenode *pa, *pb; |
const struct typenode *pa, *pb; |
265 |
265 |
pa = getPrimitiveAncestor(a); |
pa = getPrimitiveAncestor(a); |
266 |
266 |
pb = getPrimitiveAncestor(b); |
pb = getPrimitiveAncestor(b); |
267 |
|
if (((pa == gHandle || pa == gCode) && pb == gNull) || |
|
268 |
|
(pa == gNull && (pb == gCode || pb == gHandle)) || |
|
|
267 |
|
if (((pa == gString || pa == gHandle || pa == gCode) && pb == gNull) || |
|
268 |
|
(pa == gNull && (pb == gString || pb == gCode || pb == gHandle)) || |
269 |
269 |
(pa == gNull && pb == gNull)) |
(pa == gNull && pb == gNull)) |
270 |
270 |
return; |
return; |
271 |
271 |
if ((pa == gReal || pa == gInteger) && |
if ((pa == gReal || pa == gInteger) && |