[cairo] Hash rewrite #2: cairo_toy_font_face_hash_table

Carl Worth cworth at cworth.org
Thu Aug 11 16:44:24 PDT 2005


On Wed, 10 Aug 2005 18:01:41 -0700, Keith Packard wrote:
> I suggest changing the family type in the cache to const and using a
> cast to (char *) on the call to free instead of on the assignment; that
> should bring the necessary comment next to the cast and assert that no
> other non-const usages are present in the code.

Ah, that is definitely an improvement. I left the Boolean guard in
place, but renamed it "owns_family" rather than "family_is_const",
(which also reversed its sense of course). The final code does look
more clear to me.

> Other than that, the code looks fine to me.

Thanks for the careful review. I've now committed these two patches.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050811/c1ab7a7e/attachment.pgp


More information about the cairo mailing list