[Bug 28345] New: Add tp_clear_object, tp_clear_pointer analogous to g_clear_error
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Jun 1 15:21:37 CEST 2010
https://bugs.freedesktop.org/show_bug.cgi?id=28345
Summary: Add tp_clear_object, tp_clear_pointer analogous to
g_clear_error
Product: Telepathy
Version: git master
Platform: Other
URL: http://git.collabora.co.uk/?p=user/smcv/telepathy-glib
-smcv.git;a=shortlog;h=refs/heads/clearance
OS/Version: All
Status: ASSIGNED
Keywords: patch
Severity: enhancement
Priority: low
Component: tp-glib
AssignedTo: simon.mcvittie at collabora.co.uk
ReportedBy: simon.mcvittie at collabora.co.uk
QAContact: telepathy-bugs at lists.freedesktop.org
CC: will.thompson at collabora.co.uk,
travis.reitter at collabora.co.uk
Prior art includes g_clear_error in GLib, and Py_CLEAR in CPython.
I'm happy to omit the two commits "configure.ac: check for an optional C++
compiler" and "tests/util-cxx.cpp: check that tp_clear_pointer works..." if
reviewers don't feel that they add enough value.
The commit "Use tp_clear_object, tp_clear_pointer in tests" replaces
test_clear_object, CLEAR_OBJECT, CLEAR_BOXED and CLEAR_HASH, but does not
attempt to use the new macros in every situation where they'd be a code
reduction.
Similarly, the commit "Use tp_clear_object, tp_clear_pointer in various places"
is not intended to be exhaustive.
I think we should encourage these macros in new code, but not put a lot of
effort into replacing existing code with them, much like g_clear_error.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the telepathy-bugs
mailing list