5 Jul
2022
5 Jul
'22
3:22 p.m.
Il 05/07/22 17:15, Francisco Casas ha scritto:
I can do it but I would have to return a magic value (I am thinking on -1) when the field is not found, given the current uses of get_struct_field().
As Henri said, you can return a pointer (which gives you the NULL value to signal a missing field) and then use pointer arithmetic to work out the index. Returning -1 is also fine for me, I don't know if that's acceptable in vkd3d. Personally I would try to avoid pointers-as-return-values when possible. Giovanni.