# New Ticket Created by Jarkko Hietaniemi
# Please include the string: [perl #15919]
# in the subject line of all future correspondence about this issue.
# URL: http://rt.perl.org/rt2/Ticket/Display.html?id=15919
This fixes [perl #15865] and [perl #15870]. I never saw this in p6i
(eaten by hungry spamfilters?), and the RT does not like me for some
reason so I can't see whether it got filed under #15865.
- Forwarded message from Jarkko Hietaniemi [EMAIL PROTECTED] -
Subject: [PATCH] [perl #15865] SGI compilation error
From: Jarkko Hietaniemi [EMAIL PROTECTED]
Date: Wed, 31 Jul 2002 08:17:14 +0300
Message-ID: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
User-Agent: Mutt/1.2.5.1i
This fixes also [perl #15870] UNICOS/mk compilation error.
diff -ruN parrot/classes/coroutine.pmc parrot+cast/classes/coroutine.pmc
--- parrot/classes/coroutine.pmc2002-07-26 22:17:41.0 +0300
+++ parrot+cast/classes/coroutine.pmc 2002-07-31 06:35:27.0 +0300
@@ -325,14 +325,14 @@
}
*/
- INTVAL invoke () {
- struct Parrot_Coroutine* co = (struct Parrot_Sub*)SELF-data;
+ INTVAL invoke () { /* XXX shouldn't this be UINTVAL? XXX */
+ struct Parrot_Coroutine* co = (struct Parrot_Coroutine*)SELF-data;
/* Resuming co-routine or fresh call? */
if(!co-resume) {
- return co-init;
+ return PTR2INTVAL(co-init);
}
- return co-resume;
+ return PTR2INTVAL(co-resume);
}
}
diff -ruN parrot/classes/sub.pmc parrot+cast/classes/sub.pmc
--- parrot/classes/sub.pmc 2002-07-26 22:17:41.0 +0300
+++ parrot+cast/classes/sub.pmc 2002-07-31 06:37:58.0 +0300
@@ -326,8 +326,8 @@
}
*/
- INTVAL invoke () {
+ INTVAL invoke () { /* XXX shouldn't this be UINTVAL? XXX */
/* return address that the interpreter should jump to */
- return ((struct Parrot_Sub*)SELF-data)-init;
+ return PTR2INTVAL(((struct Parrot_Sub*)SELF-data)-init);
}
}
diff -ruN parrot/include/parrot/parrot.h parrot+cast/include/parrot/parrot.h
--- parrot/include/parrot/parrot.h 2002-07-18 07:30:42.0 +0300
+++ parrot+cast/include/parrot/parrot.h 2002-07-31 06:49:05.0 +0300
@@ -97,6 +97,12 @@
#define D2FPTR(x) (funcptr_t)(UINTVAL) x
#define F2DPTR(x) (void*)(UINTVAL)(funcptr_t) x
+/*
+ * Macroized in case more complex casts required in some platforms.
+ */
+#define PTR2INTVAL(p) (INTVAL)(p)
+#define INTVAL2PTR(i,p) (p*)(i)
+
/* On Win32 we need the constant O_BINARY for open() (at least for Borland C),
but on UNIX it doesn't exist, so set it to 0 if it's not defined
*/
--
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen
- End forwarded message -
--
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen