On 10/29/2026 2:12 PM, Richard Henderson wrote:
> On 10/29/26 12:04, Pierrick Bouvier wrote:
>>>>    +const char *str_array_elem_or_null(const char *const *array,
>>>> +                                   size_t nelem, uint64_t index)
>>>> +{
>>>> +    return index >= nelem ? NULL : array[index];
>>>> +}
>>> Why is this trivial function out of line?
>>>
>>
>> It ensures array is a string array, and not any other type.
>> _Generic could probably catch this also, with a more clunky syntax.
> You can get the same thing from a static inline, is my point.
>

It was my initial suggestion:
https://lore.kernel.org/qemu-devel/[email protected]/

I guessed Philippe preferred it to be an extern function, I don't mind
either way. Can be a static inline for perf.

> 
> r~


Reply via email to