[vulkan] Add a comment about using size_t

Due to wanting to access array sizes when parsing uint32_t type values,
parse_uint32_t needs to handle size_t values even though it throws out
any excess bits.
This commit is contained in:
Bill Currie 2021-02-17 13:32:04 +09:00
parent 4bda49d798
commit b08c3881b9

View file

@ -182,9 +182,11 @@ parse_uint32_t (const plfield_t *field, const plitem_t *item,
void *data, plitem_t *messages, void *context)
{
int ret = 1;
// use size_t (and cexpr_size_t) for val so references to array sizes
// can be used
size_t val = 0;
exprctx_t ectx = *((parsectx_t *) context)->ectx;
exprval_t result = { &cexpr_size_t, &val };
exprctx_t ectx = *((parsectx_t *) context)->ectx;
ectx.symtab = 0;
ectx.result = &result;
const char *valstr = PL_String (item);