Skip to content

Add an _unref_ helper macro

Peter Hutterer requested to merge whot/libei:wip/unref-games into master

Primary change here is a new attempt at reducing boilerplate. The current

   _cleanup_(type_unrefp) struct type *name = NULL;

turns into just

  _unref_(type) *name = NULL;

And because it's short enough this way, it allows us to get rid of all the extra #define _cleanup_foo_ _cleanup_(foo_unrefp) as well.

Merge request reports