Defines | |
| #define | __weak_impl(name) _w_ ## name |
| Mangle name into its weakly-referenced implementation. | |
| #define | __weak_decl(ret, name, proto, args, dfl) |
| Declare a weak function with inline safety wrapper. | |
In their native form, the function will be NULL if its file is not linked in; these macros provide an inline wrapper that returns an appropriate error indication or default value.
| #define __weak_decl | ( | ret, | |||
| name, | |||||
| proto, | |||||
| args, | |||||
| dfl | ) |
Value:
ret __weak_impl( name ) proto __attribute__ (( weak )); \ static inline ret name proto { \ if ( __weak_impl( name ) ) \ return __weak_impl( name ) args; \ return dfl; \ }
| ret | Return type of weak function | |
| name | Name of function to expose | |
| proto | Parenthesized list of arguments with types | |
| args | Parenthesized list of argument names | |
| dfl | Value to return if weak function is not available |
Definition at line 207 of file compiler.h.
1.5.7.1