[qfcc] Check handle types correctly

They can have a variety (min int and long) of backing types, so
requiring ev_invalid (which is used for struct and union).

Also, ensure is_int etc fail for handle types.
This commit is contained in:
Bill Currie 2024-09-12 14:08:49 +09:00
parent 355ee12c3f
commit cd051e8f9f

View file

@ -1252,6 +1252,9 @@ encode_type (dstring_t *encoding, const type_t *type)
int is_##t (const type_t *type) \
{ \
type = unalias_type (type); \
if (type->meta != ty_basic && type->meta != ty_algebra) { \
return 0; \
} \
return type->type == ev_##t; \
}
#include "QF/progs/pr_type_names.h"
@ -1357,7 +1360,7 @@ int
is_handle (const type_t *type)
{
type = unalias_type (type);
if (type->type == ev_invalid && type->meta == ty_handle)
if (type->meta == ty_handle)
return 1;
return 0;
}