[API] Remove broken-by-design hb_font_unset_funcs()
authorBehdad Esfahbod <behdad@behdad.org>
Tue, 10 May 2011 23:40:44 +0000 (19:40 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 10 May 2011 23:40:44 +0000 (19:40 -0400)
src/hb-font.cc
src/hb-font.h

index f04fadb..656b8ad 100644 (file)
@@ -561,28 +561,6 @@ hb_font_set_funcs (hb_font_t         *font,
   font->destroy = destroy;
 }
 
-void
-hb_font_unset_funcs (hb_font_t          *font,
-                    hb_font_funcs_t   **klass,
-                    void              **user_data,
-                    hb_destroy_func_t  *destroy)
-{
-  if (font->immutable)
-    return;
-
-  /* None of the input arguments can be NULL. */
-
-  *klass = font->klass;
-  *user_data = font->user_data;
-  *destroy = font->destroy;
-
-  if (hb_object_is_inert (font))
-    return;
-
-  font->klass = NULL;
-  font->user_data = NULL;
-  font->destroy = NULL;
-}
 
 void
 hb_font_set_scale (hb_font_t *font,
index fc3518c..358eee2 100644 (file)
@@ -242,22 +242,6 @@ hb_font_set_funcs (hb_font_t         *font,
                   void              *user_data,
                   hb_destroy_func_t  destroy);
 
-/* Returns what was set and unsets it, but doesn't destroy(user_data).
- * This is useful for wrapping / chaining font_funcs_t's.
- *
- * The client is responsible for:
- *
- *   - Take ownership of the reference on the returned klass,
- *
- *   - Calling "destroy(user_data)" exactly once if returned destroy func
- *     is not NULL and the returned info is not needed anymore.
- */
-void
-hb_font_unset_funcs (hb_font_t          *font,
-                    hb_font_funcs_t   **klass,
-                    void              **user_data,
-                    hb_destroy_func_t  *destroy);
-
 
 /*
  * We should add support for full matrices.