Differences From Artifact [6b55dc1bbf]:
- File
src/XMPPMulticastDelegate.m
— part of check-in
[cd21ff1157]
at
2018-11-05 22:30:18
on branch trunk
— Kill #ifdef HAVE_CONFIG_H
There no longer is an Xcode project for which it is needed. (user: js, size: 3125) [annotate] [blame] [check-ins using]
To Artifact [7d0f01d54a]:
- File src/XMPPMulticastDelegate.m — part of check-in [abf66b5c9b] at 2019-03-16 20:58:13 on branch trunk — Use dot syntax (user: js, size: 3137) [annotate] [blame] [check-ins using]
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2012, 2019, Jonathan Schleifer <js@webkeks.org> * * https://heap.zone/objxmpp/ * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * |
︙ | ︙ | |||
53 54 55 56 57 58 59 | - (void)addDelegate: (id)delegate { [_delegates addItem: &delegate]; } - (void)removeDelegate: (id)delegate { | | | | | | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | - (void)addDelegate: (id)delegate { [_delegates addItem: &delegate]; } - (void)removeDelegate: (id)delegate { id const *items = _delegates.items; size_t i, count = _delegates.count; for (i = 0; i < count; i++) { if (items[i] != delegate) continue; [_delegates removeItemAtIndex: i]; return; } } - (bool)broadcastSelector: (SEL)selector withObject: (id)object { void *pool = objc_autoreleasePoolPush(); OFMutableData *currentDelegates = [[_delegates copy] autorelease]; id const *items = currentDelegates.items; size_t i, count = currentDelegates.count; bool handled = false; for (i = 0; i < count; i++) { id responder = items[i]; if (![responder respondsToSelector: selector]) continue; |
︙ | ︙ | |||
97 98 99 100 101 102 103 | - (bool)broadcastSelector: (SEL)selector withObject: (id)object1 withObject: (id)object2 { void *pool = objc_autoreleasePoolPush(); OFMutableData *currentDelegates = [[_delegates copy] autorelease]; | | | | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | - (bool)broadcastSelector: (SEL)selector withObject: (id)object1 withObject: (id)object2 { void *pool = objc_autoreleasePoolPush(); OFMutableData *currentDelegates = [[_delegates copy] autorelease]; id const *items = currentDelegates.items; size_t i, count = currentDelegates.count; bool handled = false; for (i = 0; i < count; i++) { id responder = items[i]; if (![responder respondsToSelector: selector]) continue; |
︙ | ︙ |