pango_fc_font_unlock_face() (fwd)



FYI.

--behdad
http://behdad.org/

"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
	-- Dan Bern, "New American Language"

---------- Forwarded message ----------
Date: Sun, 13 Nov 2005 23:17:29 -0500
From: Owen Taylor <otaylor redhat com>
To:	Behdad Esfahbod <behdad>
Subject: pango_fc_font_unlock_face()

2005-11-04  Behdad Esfahbod  <behdad gnome org>

        * pango/pangofc-font.c: Use macros for locking and unlocking fonts
        we know are valid to avoid redundant PANGO_IS_FC_FONT checks.
        (Review by Matthias Clasen)

I don't really have any any objections to this patch, just wanted to point
out for future reference that another perfectly valid (in my opinion)
approach is to simply *remove* g_return_if_fail() statements on hotspot
functions.

If a single g_return_if_fail() shows up on a profile, it is more problems
than it is worth. This is specially true if the function will crash on
an invalid or null pointer. If it just stores it someone for future
reference, then the g_return_if_fail() is more useful, because tracking
down the source of the bad stored pointer later can be hard.

Regards,
						Owen




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