[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cascaded casts
From: |
Friedrich Beckmann |
Subject: |
Re: Cascaded casts |
Date: |
Sun, 30 Aug 2020 10:39:37 +0200 |
Good morning John!
yes - I will change those two modifications below according to your ideas.
Fritz
> Am 30.08.2020 um 08:13 schrieb John Darrington <john@darrington.wattle.id.au>:
>
> Can you please redo this using the macros from glib:
>
> GPOINTER_TO_INT and GINT_TO_POINTER
> For these g_list_foreach functions, what I suggest is that we define a macro.
> For example:
>
> #define STRANGE_CAST(X) ((GFunc) (((void (*) (void))))((X)))
>
> then we can write
>
> g_list_foreach (l, STRANGE_CAST (gtk_tree_path_free), NULL);