Path: csiph.com!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED.mailhub.linuxsc.com!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: Help requested with P99-based macro to create Wayland listeners
Date: Wed, 10 Apr 2024 09:05:48 -0700
Organization: A noiseless patient Spider
Message-ID: <86le5l19ur.fsf@linuxsc.com>
References:
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="mailhub.linuxsc.com:45.79.96.183"; logging-data="1120477"; mail-complaints-to="abuse@eternal-september.org"
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:TXBW2pvJ5Ic6I6srJO/oZ6ey8+E=
Xref: csiph.com comp.lang.c:384259
James Kuyper writes:
> On 4/8/24 20:36, Blue-Maned_Hawk wrote:
>
>> This macro doesn't work and i don't know why. I've tried multiple
>> different things to try to delay the expansion of _0MAKE_LISTENER and none
>> of them have worked. I don't know if there's a more idiomatic way to do
>> this. I've tried looking at the output from putting it through ?cpp? and
>> that didn't work because it errored out before i could see what it
>> expanded to.
>>
>> #define MAKE_LISTENER(object_type, ...) static const struct\
>> object_type##_listener object_type##_listener = { P99_SEQ(\
>
> This isn't a C problem, or at least,not entirely a C problem. I'd
> thought that the P99 in your subject line might be a typo for C99, but I
> have no idea what P99_SEQ is. Wikipedia knows 9 different meanings for
> P99. [...]
Someone might tell James that it is entirely a C problem for
anyone with enough sense to search for P99_SEQ rather than
just P99.