Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d5f5385

Browse files
committed
include macglue.h so we can use HAVE_UNIVERSAL_HEADERS;
and correct sens of PyMac_Idle() test. But should'nt this raise KeyboardInterrupt instead of silently returning?
1 parent cfa00ea commit d5f5385

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

Mac/Unsupported/mactcp/macdnrmodule.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***********************************************************
2-
Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
3-
Amsterdam, The Netherlands.
2+
Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
3+
The Netherlands.
44
55
All Rights Reserved
66
@@ -25,10 +25,11 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2525
#include "allobjects.h"
2626
#include "modsupport.h" /* For getargs() etc. */
2727

28+
#include "macglue.h"
2829
#include <AddressXlation.h>
2930
#include <Desk.h>
3031

31-
#ifndef __MWERKS__
32+
#ifndef HAVE_UNIVERSAL_HEADERS
3233
#define ResultUPP ResultProcPtr
3334
#define NewResultProc(x) (x)
3435
/* The '2' has move in this name... */
@@ -76,7 +77,7 @@ static int dnrwait(self)
7677
dnrrobject *self;
7778
{
7879
while ( self->waiting ) {
79-
if ( !PyMac_Idle() )
80+
if ( PyMac_Idle() )
8081
return 0;
8182
}
8283
return 1;
@@ -90,6 +91,7 @@ dnrr_wait(self, args)
9091
if (!newgetargs(args, ""))
9192
return NULL;
9293
if ( !dnrwait(self) ) {
94+
/* XXX An interrupt is pending -- is this correct? */
9395
INCREF(None);
9496
return None;
9597
}
@@ -194,6 +196,7 @@ dnrr_getattr(self, name)
194196
err_clear();
195197
if ( self->waiting )
196198
if ( !dnrwait(self) ) {
199+
/* XXX An interrupt is pending -- is this correct? */
197200
err_setstr(ErrorObject, "Resolver busy");
198201
return NULL;
199202
}

0 commit comments

Comments
 (0)