geany/geany — comment on commit efcce8808e92ba56684605790959cb014a11c9c8
File:  line 0
By b4n:

Agreed.

Also, if we want to keep the same behavior while using a function, we could, in addition to:

```C
/* having it returning the new pointer may be useful too */
static inline gpointer utils_setptr(gpointer *ptr, gpointer val)
{
g_free(*ptr)
*ptr = val;
return *ptr;
}
```

have something like this:

```C
#define SETPTR(ptr, val) (utils_setptr(&(ptr), val))
```

Though, while this allows to roughly simply replace `setptr` with `SETPTR`, it hides the `&`.