[Commit] cairo/src cairoint.h,1.14,1.15
Carl Worth
commit at keithp.com
Thu Sep 4 17:32:23 PDT 2003
- Previous message: [Commit] cairo/src cairo.c, 1.7, 1.8 cairo.h, 1.9,
1.10 cairo_gstate.c, 1.7, 1.8 cairoint.h, 1.13, 1.14
- Next message: [Commit] cairo ChangeLog,1.51,1.52
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: cworth
Update of /local/src/CVS/cairo/src
In directory home.keithp.com:/tmp/cvs-serv22194/src
Modified Files:
cairoint.h
Log Message:
Changed DEPRECATE method to preseve binary compatibility, but break
source-level compatibility.
Index: cairoint.h
===================================================================
RCS file: /local/src/CVS/cairo/src/cairoint.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- cairoint.h 4 Sep 2003 23:27:35 -0000 1.14
+++ cairoint.h 4 Sep 2003 23:32:21 -0000 1.15
@@ -48,16 +48,16 @@
/* These macros allow us to deprecate a function by providing an alias
for the old function name to the new function name. With this
- macro, code using the deprecated function will still compile and
- link, but will provide a useful warning message giving the old and
- new function names to the user at compilation time, (as long as the
- compiler reports calls to undeclared functions).
+ macro, binary compatibility is preserved. The macro only works on
+ some platforms --- tough.
- If the macro is not supported by the compiler, the program will not
- link, and the user will still se a useful error message. */
+ Meanwhile, new definitions in the public header file break the
+ source code so that it will no longer link against the old
+ symbols. Instead it will give a descriptive error message
+ indicating that the old function has been deprecated by the new
+ function. */
#if __GNUC__ >= 2 && defined(__ELF__)
-# define DEPRECATE(old, new) ADD_ALIAS(old, new); ADD_ALIAS(old##_DEPRECATED_BY_##new , new)
-# define ADD_ALIAS(old, new) \
+# define DEPRECATE(old, new) \
extern __typeof (new) old \
__asm__ ("" #old) \
__attribute__((__alias__("" #new)))
- Previous message: [Commit] cairo/src cairo.c, 1.7, 1.8 cairo.h, 1.9,
1.10 cairo_gstate.c, 1.7, 1.8 cairoint.h, 1.13, 1.14
- Next message: [Commit] cairo ChangeLog,1.51,1.52
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Commit
mailing list