[Commit] cairo/src cairo.h,1.8,1.9 cairoint.h,1.11,1.12

Carl Worth commit at keithp.com
Thu Sep 4 12:21:17 PDT 2003


Committed by: cworth

Update of /local/src/CVS/cairo/src
In directory home.keithp.com:/tmp/cvs-serv20236

Modified Files:
	cairo.h cairoint.h 
Log Message:
Fixed DEPRECATE macro so that old programs will still work

Index: cairo.h
===================================================================
RCS file: /local/src/CVS/cairo/src/cairo.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- cairo.h	4 Sep 2003 13:52:01 -0000	1.8
+++ cairo.h	4 Sep 2003 18:21:15 -0000	1.9
@@ -532,6 +532,7 @@
    deprecated functions to continue to work for now, (with useful
    warnings). But the deprecated functions will not appear in the next
    release. */
+#ifndef _CAIROINT_H_
 #define cairo_get_operator	cairo_get_operator_DEPRECATED_BY_cairo_current_operator
 #define cairo_get_rgb_color	cairo_get_rgb_color_DEPRECATED_BY_cairo_current_rgb_color
 #define cairo_get_alpha	 	cairo_get_alpha_DEPRECATED_BY_cairo_current_alpha
@@ -546,6 +547,7 @@
 #define cairo_get_target_surface	cairo_get_target_surface_DEPRECATED_BY_cairo_current_target_surface
 #define cairo_get_status	 	cairo_get_status_DEPRECATED_BY_cairo_status
 #define cairo_get_status_string		cairo_get_status_string_DEPRECATED_BY_cairo_status_string
+#endif
 
 #ifdef __cplusplus
 }

Index: cairoint.h
===================================================================
RCS file: /local/src/CVS/cairo/src/cairoint.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- cairoint.h	4 Sep 2003 13:52:01 -0000	1.11
+++ cairoint.h	4 Sep 2003 18:21:15 -0000	1.12
@@ -56,10 +56,10 @@
    If the macro is not supported by the compiler, the program will not
    link, and the user will still se a useful error message.  */
 #if __GNUC__ >= 2 && defined(__ELF__)
-# define DEPRECATE(old, new)	DEPRECATE_INT(old, old##_DEPRECATED_BY_##new , new)
-# define DEPRECATE_INT(old, int, new)		\
-	extern __typeof (new) int		\
-	__asm__ ("" #int)			\
+# define DEPRECATE(old, new)	ADD_ALIAS(old, new); ADD_ALIAS(old##_DEPRECATED_BY_##new , new)
+# define ADD_ALIAS(old, new)			\
+	extern __typeof (new) old		\
+	__asm__ ("" #old)			\
 	__attribute__((__alias__("" #new)))
 #else
 # define DEPRECATE(old, new)




More information about the Commit mailing list