Help requested with P99-based macro to create Wayland listeners

Liste des GroupesRevenir à cl c 
Sujet : Help requested with P99-based macro to create Wayland listeners
De : bluemanedhawk (at) *nospam* invalid.invalid (Blue-Maned_Hawk)
Groupes : comp.lang.c
Date : 09. Apr 2024, 02:36:11
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <pan$3770d$7f0531e6$76520fa1$2c09330e@invalid.invalid>
User-Agent : Pan/0.154 (Izium; 517acf4)
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(\
_0MAKE_LISTENER, P99_SEQ((object_type), __VA_ARGS__)) }
#define _0MAKE_LISTENER(x) _1MAKE_LISTENER (x, _2MAKE_LISTENER
#define _1MAKE_LISTENER _3MAKE_LISTENER
#define _2MAKE_LISTENER(y) y)
#define _3MAKE_LISTENER _4MAKE_LISTENER
#define _4MAKE_LISTENER(object_type, event_name) .event_name =\
callback_##object_type##_##event_name



--
Blue-Maned_Hawk│shortens to Hawk│/blu.mɛin.dʰak/│he/him/his/himself/Mr.
blue-maned_hawk.srht.site
Like many 40-year-olds, these machines have more health issues than
expected.

Date Sujet#  Auteur
9 Apr 24 * Help requested with P99-based macro to create Wayland listeners22Blue-Maned_Hawk
9 Apr 24 +* Re: Help requested with P99-based macro to create Wayland listeners16Tim Rentsch
9 Apr 24 i`* Re: Help requested with P99-based macro to create Wayland listeners15Blue-Maned_Hawk
9 Apr 24 i `* Re: Help requested with P99-based macro to create Wayland listeners14David Brown
9 Apr 24 i  `* Re: Help requested with P99-based macro to create Wayland listeners13Blue-Maned_Hawk
10 Apr 24 i   +* Re: Help requested with P99-based macro to create Wayland listeners11David Brown
10 Apr 24 i   i+* Re: Help requested with P99-based macro to create Wayland listeners3Ben Bacarisse
10 Apr 24 i   ii`* Re: Help requested with P99-based macro to create Wayland listeners2Tim Rentsch
10 Apr 24 i   ii `- Re: Help requested with P99-based macro to create Wayland listeners1David Brown
10 Apr 24 i   i`* Re: Help requested with P99-based macro to create Wayland listeners7David Brown
10 Apr 24 i   i `* Re: Help requested with P99-based macro to create Wayland listeners6Chris M. Thomasson
10 Apr 24 i   i  `* Re: Help requested with P99-based macro to create Wayland listeners5David Brown
10 Apr 24 i   i   +* Re: Help requested with P99-based macro to create Wayland listeners2bart
10 Apr 24 i   i   i`- Re: Help requested with P99-based macro to create Wayland listeners1Chris M. Thomasson
10 Apr 24 i   i   `* Re: Help requested with P99-based macro to create Wayland listeners2Chris M. Thomasson
10 Apr 24 i   i    `- Re: Help requested with P99-based macro to create Wayland listeners1Chris M. Thomasson
10 Apr 24 i   `- Re: Help requested with P99-based macro to create Wayland listeners1Tim Rentsch
10 Apr 24 +* Re: Help requested with P99-based macro to create Wayland listeners4James Kuyper
10 Apr 24 i+- Re: Help requested with P99-based macro to create Wayland listeners1Blue-Maned_Hawk
10 Apr 24 i+- Re: Help requested with P99-based macro to create Wayland listeners1Tim Rentsch
11 Apr 24 i`- Re: Help requested with P99-based macro to create Wayland listeners1Lawrence D'Oliveiro
11 Apr 24 `- Re: Help requested with P99-based macro to create Wayland listeners1Tim Rentsch

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal