diff --git a/tools/qfcc/include/obj_type.h b/tools/qfcc/include/obj_type.h index f779c0c07..7217bf804 100644 --- a/tools/qfcc/include/obj_type.h +++ b/tools/qfcc/include/obj_type.h @@ -44,10 +44,12 @@ #include "type.h" typedef struct qfot_ptrfld_s { - pointer_t type; ///< referenced type + pr_int_t type; ///< ev_field or ev_pointer + pointer_t aux_type; ///< referenced type } qfot_ptrfld_t; typedef struct qfot_func_s { + pr_int_t type; ///< always ev_func pointer_t return_type; ///< return type of the function pr_int_t num_params; ///< ones compliment count of the ///< parameters. -ve values indicate the diff --git a/tools/qfcc/source/obj_type.c b/tools/qfcc/source/obj_type.c index 40f7528c4..a9e961153 100644 --- a/tools/qfcc/source/obj_type.c +++ b/tools/qfcc/source/obj_type.c @@ -119,6 +119,7 @@ qfo_encode_func (type_t *type) def = qfo_new_encoding (type, size); enc = D_POINTER (qfot_type_t, def); func = &enc->t.func; + func->type = ev_func; ENC_DEF (func->return_type, return_type_def); func->num_params = type->t.func.num_params; for (i = 0; i < param_count; i++) @@ -136,7 +137,8 @@ qfo_encode_ptrfld (type_t *type) type_def = qfo_encode_type (type->t.fldptr.type); def = qfo_new_encoding (type, sizeof (enc->t.ptrfld)); enc = D_POINTER (qfot_type_t, def); - ENC_DEF (enc->t.ptrfld.type, type_def); + enc->t.ptrfld.type = type->type; + ENC_DEF (enc->t.ptrfld.aux_type, type_def); return def; }