babl r386 - in trunk: . babl tests



Author: martinn
Date: Sun Jan 18 15:14:59 2009
New Revision: 386
URL: http://svn.gnome.org/viewvc/babl?rev=386&view=rev

Log:
Do a s/babl_destroy/babl_exit since 'destroy' is better paired
with a 'create' and other libraries also use the 'init'/'exit'
pair, including GEGL. Keep a define for babl_destroy unless
BABL_DISABLE_DEPRECATED is defined.

* babl/babl-main.h
* babl/babl.c
* tests/babl-html-dump.c
* tests/babl_class_name.c
* tests/babl_fish_path_dhtml.c
* tests/babl_fish_path_fitness.c
* tests/conversions.c
* tests/formats.c
* tests/grayscale_to_rgb.c
* tests/introspect.c
* tests/models.c
* tests/nop.c
* tests/rgb_to_bgr.c
* tests/rgb_to_ycbcr.c
* tests/sanity.c
* tests/srgb_to_lab_u8.c
* tests/types.c


Modified:
   trunk/ChangeLog
   trunk/babl/babl-main.h
   trunk/babl/babl.c
   trunk/tests/babl-html-dump.c
   trunk/tests/babl_class_name.c
   trunk/tests/babl_fish_path_dhtml.c
   trunk/tests/babl_fish_path_fitness.c
   trunk/tests/conversions.c
   trunk/tests/formats.c
   trunk/tests/grayscale_to_rgb.c
   trunk/tests/introspect.c
   trunk/tests/models.c
   trunk/tests/nop.c
   trunk/tests/rgb_to_bgr.c
   trunk/tests/rgb_to_ycbcr.c
   trunk/tests/sanity.c
   trunk/tests/srgb_to_lab_u8.c
   trunk/tests/types.c

Modified: trunk/babl/babl-main.h
==============================================================================
--- trunk/babl/babl-main.h	(original)
+++ trunk/babl/babl-main.h	Sun Jan 18 15:14:59 2009
@@ -23,13 +23,24 @@
 #error  this file is only to be included by babl.h
 #endif
 
-/** Initialize the babl library */
+/**
+ * Initialize the babl library
+ */
 void   babl_init       (void);
 
-/** Deinitialize the babl library (frees any resources used, if the number
- *  of calls to babl_destroy() is is equal to the number of calls to
- *  babl_init()
+/**
+ * Deinitialize the babl library (frees any resources used, if the
+ * number of calls to babl_exit() is is equal to the number of calls
+ * to babl_init()
  */
-void   babl_destroy    (void);
+void   babl_exit       (void);
+
+
+#ifndef BABL_DISABLE_DEPRECATED
+
+#define babl_destroy babl_exit
+
+#endif /* BABL_DISABLE_DEPRECATED */
+
 
 #endif

Modified: trunk/babl/babl.c
==============================================================================
--- trunk/babl/babl.c	(original)
+++ trunk/babl/babl.c	Sun Jan 18 15:14:59 2009
@@ -46,7 +46,7 @@
 }
 
 void
-babl_destroy (void)
+babl_exit (void)
 {
   if (!-- ref_count)
     {

Modified: trunk/tests/babl-html-dump.c
==============================================================================
--- trunk/tests/babl-html-dump.c	(original)
+++ trunk/tests/babl-html-dump.c	Sun Jan 18 15:14:59 2009
@@ -79,7 +79,7 @@
    printf ("</div>\n");
    printf ("</div>\n");
  */
-  babl_destroy ();
+  babl_exit ();
 
   return 0;
 }

Modified: trunk/tests/babl_class_name.c
==============================================================================
--- trunk/tests/babl_class_name.c	(original)
+++ trunk/tests/babl_class_name.c	Sun Jan 18 15:14:59 2009
@@ -68,6 +68,6 @@
   babl_init ();
   if (test ())
     return -1;
-  babl_destroy ();
+  babl_exit ();
   return 0;
 }

Modified: trunk/tests/babl_fish_path_dhtml.c
==============================================================================
--- trunk/tests/babl_fish_path_dhtml.c	(original)
+++ trunk/tests/babl_fish_path_dhtml.c	Sun Jan 18 15:14:59 2009
@@ -8,7 +8,7 @@
   babl_set_extender (babl_extension_quiet_log ());
   babl_fish_stats (stdout);
 
-  babl_destroy ();
+  babl_exit ();
 
   return 0;
 }

Modified: trunk/tests/babl_fish_path_fitness.c
==============================================================================
--- trunk/tests/babl_fish_path_fitness.c	(original)
+++ trunk/tests/babl_fish_path_fitness.c	Sun Jan 18 15:14:59 2009
@@ -89,7 +89,7 @@
   /*printf ("ok / total : %i %i %f\n", ok, total, (1.0*ok) / total);
    */
 
-  babl_destroy ();
+  babl_exit ();
 
   return 0;
 }

Modified: trunk/tests/conversions.c
==============================================================================
--- trunk/tests/conversions.c	(original)
+++ trunk/tests/conversions.c	Sun Jan 18 15:14:59 2009
@@ -30,7 +30,7 @@
   babl_set_extender (babl_extension_quiet_log ());
   babl_conversion_class_for_each (each_conversion, NULL);
 
-  babl_destroy ();
+  babl_exit ();
 
   return !OK;
 }

Modified: trunk/tests/formats.c
==============================================================================
--- trunk/tests/formats.c	(original)
+++ trunk/tests/formats.c	Sun Jan 18 15:14:59 2009
@@ -20,7 +20,7 @@
   babl_set_extender (babl_extension_quiet_log ());
   babl_format_class_for_each (format_check, (void *) 1);
 
-  babl_destroy ();
+  babl_exit ();
 
   return 0;
 }

Modified: trunk/tests/grayscale_to_rgb.c
==============================================================================
--- trunk/tests/grayscale_to_rgb.c	(original)
+++ trunk/tests/grayscale_to_rgb.c	Sun Jan 18 15:14:59 2009
@@ -76,7 +76,7 @@
   babl_init ();
   if (test ())
     return -1;
-  babl_destroy ();
+  babl_exit ();
   return 0;
 }
 

Modified: trunk/tests/introspect.c
==============================================================================
--- trunk/tests/introspect.c	(original)
+++ trunk/tests/introspect.c	Sun Jan 18 15:14:59 2009
@@ -24,6 +24,6 @@
 {
   babl_init ();
   babl_introspect (NULL);
-  babl_destroy ();
+  babl_exit ();
   return 0;
 }

Modified: trunk/tests/models.c
==============================================================================
--- trunk/tests/models.c	(original)
+++ trunk/tests/models.c	Sun Jan 18 15:14:59 2009
@@ -27,7 +27,7 @@
   babl_set_extender (babl_extension_quiet_log ());
   babl_model_class_for_each (model_check, NULL);
 
-  babl_destroy ();
+  babl_exit ();
 
   return !OK;
 }

Modified: trunk/tests/nop.c
==============================================================================
--- trunk/tests/nop.c	(original)
+++ trunk/tests/nop.c	Sun Jan 18 15:14:59 2009
@@ -23,6 +23,6 @@
       char **argv)
 {
   babl_init ();
-  babl_destroy ();
+  babl_exit ();
   return 0;
 }

Modified: trunk/tests/rgb_to_bgr.c
==============================================================================
--- trunk/tests/rgb_to_bgr.c	(original)
+++ trunk/tests/rgb_to_bgr.c	Sun Jan 18 15:14:59 2009
@@ -84,6 +84,6 @@
   babl_init ();
   if (test ())
     return -1;
-  babl_destroy ();
+  babl_exit ();
   return 0;
 }

Modified: trunk/tests/rgb_to_ycbcr.c
==============================================================================
--- trunk/tests/rgb_to_ycbcr.c	(original)
+++ trunk/tests/rgb_to_ycbcr.c	Sun Jan 18 15:14:59 2009
@@ -91,6 +91,6 @@
   babl_init ();
   if (test ())
     return -1;
-  babl_destroy ();
+  babl_exit ();
   return 0;
 }

Modified: trunk/tests/sanity.c
==============================================================================
--- trunk/tests/sanity.c	(original)
+++ trunk/tests/sanity.c	Sun Jan 18 15:14:59 2009
@@ -25,6 +25,6 @@
   babl_init ();
   if (!babl_sanity ())
     return -1;
-  babl_destroy ();
+  babl_exit ();
   return 0;
 }

Modified: trunk/tests/srgb_to_lab_u8.c
==============================================================================
--- trunk/tests/srgb_to_lab_u8.c	(original)
+++ trunk/tests/srgb_to_lab_u8.c	Sun Jan 18 15:14:59 2009
@@ -71,6 +71,6 @@
   babl_init ();
   if (test ())
     return -1;
-  babl_destroy ();
+  babl_exit ();
   return 0;
 }

Modified: trunk/tests/types.c
==============================================================================
--- trunk/tests/types.c	(original)
+++ trunk/tests/types.c	Sun Jan 18 15:14:59 2009
@@ -21,7 +21,7 @@
   babl_set_extender (babl_extension_quiet_log ());
   babl_type_class_for_each (type_check, NULL);
 
-  babl_destroy ();
+  babl_exit ();
 
   return !OK;
 }



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