summaryrefslogtreecommitdiffstats
path: root/Mac/Unsupported
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1995-01-22 16:48:43 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1995-01-22 16:48:43 (GMT)
commit860dc048ca0a5327e3b52731f742b1e8a99d21ce (patch)
tree6d04da31c60201082a059d2118589839685d1c02 /Mac/Unsupported
parent2fc94eecb2415de1d966900fa15af179beb07723 (diff)
downloadcpython-860dc048ca0a5327e3b52731f742b1e8a99d21ce.zip
cpython-860dc048ca0a5327e3b52731f742b1e8a99d21ce.tar.gz
cpython-860dc048ca0a5327e3b52731f742b1e8a99d21ce.tar.bz2
Ported to CW5 (or to new Universal Headers, actually)
Diffstat (limited to 'Mac/Unsupported')
-rw-r--r--Mac/Unsupported/mactcp/macdnrmodule.c9
-rw-r--r--Mac/Unsupported/mactcp/mactcpmodule.c5
2 files changed, 11 insertions, 3 deletions
diff --git a/Mac/Unsupported/mactcp/macdnrmodule.c b/Mac/Unsupported/mactcp/macdnrmodule.c
index ca6ea1e..ebf3f6b 100644
--- a/Mac/Unsupported/mactcp/macdnrmodule.c
+++ b/Mac/Unsupported/mactcp/macdnrmodule.c
@@ -31,6 +31,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef __MWERKS__
#define ResultUPP ResultProcPtr
#define NewResultProc(x) (x)
+/* The '2' has move in this name... */
+#define Result2UPP ResultProc2Ptr
+#define NewResult2Proc(x) (x)
#endif
static object *ErrorObject;
@@ -360,6 +363,7 @@ dnr_HInfo(self, args)
OSErr err;
char *hostname;
dnrrobject *rv;
+ Result2UPP cb_upp = NewResult2Proc(dnrr_done);
if (!newgetargs(args, "s", &hostname))
return NULL;
@@ -367,7 +371,7 @@ dnr_HInfo(self, args)
return NULL;
if ( (rv=newdnrrobject(DNR_HINFO)) == NULL )
return NULL;
- err = HInfo(hostname, &rv->hinfo, (ResultProc2Ptr)dnrr_done, (char *)rv);
+ err = HInfo(hostname, &rv->hinfo, cb_upp, (char *)rv);
if ( err == cacheFault ) {
rv->waiting++;
INCREF(rv);
@@ -392,6 +396,7 @@ dnr_MXInfo(self, args)
OSErr err;
char *hostname;
dnrrobject *rv;
+ Result2UPP cb_upp = NewResult2Proc(dnrr_done);
if (!newgetargs(args, "s", &hostname))
return NULL;
@@ -399,7 +404,7 @@ dnr_MXInfo(self, args)
return NULL;
if ( (rv=newdnrrobject(DNR_MX)) == NULL )
return NULL;
- err = MXInfo(hostname, &rv->hinfo, (ResultProc2Ptr)dnrr_done, (char *)rv);
+ err = MXInfo(hostname, &rv->hinfo, cb_upp, (char *)rv);
if ( err == cacheFault ) {
rv->waiting++;
INCREF(rv);
diff --git a/Mac/Unsupported/mactcp/mactcpmodule.c b/Mac/Unsupported/mactcp/mactcpmodule.c
index f2c1290..aaf0d51 100644
--- a/Mac/Unsupported/mactcp/mactcpmodule.c
+++ b/Mac/Unsupported/mactcp/mactcpmodule.c
@@ -36,6 +36,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define STATE_ESTAB 8
#define STATE_CWAIT 18
+/* Python code has an additional reason for asr call: open done */
+#define MY_OPEN_DONE 32766
+
static object *ErrorObject;
TCPIOCompletionUPP upp_tcp_done;
@@ -334,7 +337,7 @@ tcps_done(pb)
/* Extension of mactcp semantics: also call asr on open complete */
if ( self->asr == None )
return;
- self->asr_ec = lastEvent-1;
+ self->asr_ec = MY_OPEN_DONE;
self->asr_reason = 0;
Py_AddPendingCall(tcps_asr_safe, (void *)self);
}