mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Avoid conflict of ivar name with systemcall name
This commit is contained in:
parent
2473c744d1
commit
5c5a62e8d4
2 changed files with 15 additions and 15 deletions
|
@ -43,7 +43,7 @@
|
|||
{
|
||||
NSRunLoop *runLoop;
|
||||
NSString *mode;
|
||||
AvahiPoll *poll;
|
||||
AvahiPoll *ap;
|
||||
NSMutableArray *children;
|
||||
NSLock *lock;
|
||||
}
|
||||
|
|
|
@ -398,16 +398,16 @@ GSAvahiTimeoutFree(AvahiTimeout* timeout)
|
|||
}
|
||||
lock = [[NSLock alloc] init];
|
||||
[lock setName: @"GSAvahiRunLoopContextLock"];
|
||||
poll = malloc(sizeof(AvahiPoll));
|
||||
NSAssert(poll, @"Could not allocate avahi polling structure.");
|
||||
poll->userdata = (void*)self; //userInfo
|
||||
poll->watch_new = GSAvahiWatchNew; //create a new GSAvahiWatcher
|
||||
poll->watch_update = GSAvahiWatchUpdate; //update the watcher
|
||||
poll->watch_get_events = GSAvahiWatchGetEvents; //retrieve events
|
||||
poll->watch_free = GSAvahiWatchFree; //remove watcher from context
|
||||
poll->timeout_new = GSAvahiTimeoutNew; //create a new GSAvahiTimer
|
||||
poll->timeout_update = GSAvahiTimeoutUpdate; //update the timer
|
||||
poll->timeout_free = GSAvahiTimeoutFree; //remove the timer from context
|
||||
ap = malloc(sizeof(AvahiPoll));
|
||||
NSAssert(ap, @"Could not allocate avahi polling structure.");
|
||||
ap->userdata = (void*)self; //userInfo
|
||||
ap->watch_new = GSAvahiWatchNew; //create a new GSAvahiWatcher
|
||||
ap->watch_update = GSAvahiWatchUpdate; //update the watcher
|
||||
ap->watch_get_events = GSAvahiWatchGetEvents; //retrieve events
|
||||
ap->watch_free = GSAvahiWatchFree; //remove watcher from context
|
||||
ap->timeout_new = GSAvahiTimeoutNew; //create a new GSAvahiTimer
|
||||
ap->timeout_update = GSAvahiTimeoutUpdate; //update the timer
|
||||
ap->timeout_free = GSAvahiTimeoutFree; //remove the timer from context
|
||||
//Runloops don't need to be retained;
|
||||
runLoop = rl;
|
||||
ASSIGNCOPY(mode,aMode);
|
||||
|
@ -434,7 +434,7 @@ GSAvahiTimeoutFree(AvahiTimeout* timeout)
|
|||
|
||||
- (const AvahiPoll*) avahiPoll
|
||||
{
|
||||
return (const AvahiPoll*)poll;
|
||||
return (const AvahiPoll*)ap;
|
||||
}
|
||||
|
||||
- (GSAvahiTimer*) avahiTimerWithCallback: (AvahiTimeoutCallback)callback
|
||||
|
@ -539,7 +539,7 @@ GSAvahiTimeoutFree(AvahiTimeout* timeout)
|
|||
* try to create additional watchers and timers on the runloop, so we should
|
||||
* clean it up properly:
|
||||
*/
|
||||
poll->userdata = (void*)NULL;
|
||||
ap->userdata = (void*)NULL;
|
||||
[self removeFromRunLoop: runLoop
|
||||
forMode: mode];
|
||||
FOR_IN(GSAvahiWatcher*, child, children)
|
||||
|
@ -547,8 +547,8 @@ GSAvahiTimeoutFree(AvahiTimeout* timeout)
|
|||
[child setContext: nil];
|
||||
}
|
||||
END_FOR_IN(children)
|
||||
free(poll);
|
||||
poll = NULL;
|
||||
free(ap);
|
||||
ap = NULL;
|
||||
[children release];
|
||||
[mode release];
|
||||
[lock release];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue