always return NULL in _unref() APIs

Returning anything else but NULL would suggest the caller's
reference might still be valid, but it isn't, because the
caller just invoked _unref() after all. This turns the return
value into a typesafe shortcut that allows unreffing and
resetting a reference in one line. In contrast to solutions
for this which take a pointer to a pointer to accomplish the
same this solution is just syntactic sugar the developer can
make use of but doesn't have to, and this is particularly
useful when immediately unreffing objects returned by function
calls.
1 file changed
tree: 6752c706adbc451b36d90e47dd8c3a1ed5bb86df
  1. .gitignore
  2. COPYING
  3. Makefile.am
  4. NEWS
  5. README
  6. autogen.sh
  7. configure.ac
  8. m4/
  9. src/