| 647 | | #define MPIR_Errhandler_add_ref( _errhand ) \ |
| 648 | | do { MPIU_Object_add_ref( _errhand ); } while (0) |
| 649 | | #define MPIR_Errhandler_release_ref( _errhand, _inuse ) \ |
| 650 | | do { MPIU_Object_release_ref( _errhand, _inuse ); } while (0) |
| | 647 | /* We never reference count the builtin error handler objects, regardless of how |
| | 648 | * we decide to reference count the other predefined objects. If we get to the |
| | 649 | * point where we never reference count *any* of the builtin objects then we |
| | 650 | * should probably remove these checks and let them fall through to the checks |
| | 651 | * for BUILTIN down in the MPIU_Object_* routines. */ |
| | 652 | #define MPIR_Errhandler_add_ref( _errhand ) \ |
| | 653 | do { \ |
| | 654 | if (HANDLE_GET_KIND((_errhand)->handle) != HANDLE_KIND_BUILTIN) { \ |
| | 655 | MPIU_Object_add_ref( _errhand ); \ |
| | 656 | } \ |
| | 657 | } while (0) |
| | 658 | #define MPIR_Errhandler_release_ref( _errhand, _inuse ) \ |
| | 659 | do { \ |
| | 660 | if (HANDLE_GET_KIND((_errhand)->handle) != HANDLE_KIND_BUILTIN) { \ |
| | 661 | MPIU_Object_release_ref( (_errhand), (_inuse) ); \ |
| | 662 | } \ |
| | 663 | else { \ |
| | 664 | *(_inuse) = 1; \ |
| | 665 | } \ |
| | 666 | } while (0) |