pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cascaded casts


From: John Darrington
Subject: Re: Cascaded casts
Date: Sun, 30 Aug 2020 11:09:06 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

Thanks.

(obviously use a more sensible name instead of STRANGE_CAST)

J'

On Sun, Aug 30, 2020 at 10:39:37AM +0200, Friedrich Beckmann wrote:
     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);
     



reply via email to

[Prev in Thread] Current Thread [Next in Thread]