[svn:mod_parrot] r328 - in mod_parrot/trunk: . src

[email protected] Sun, 20 Jan 2008 11:55:37 -0800 (PST)
Newsgroups perl.cvs.mod_parrot
Message-ID <[email protected]>
Author: jhorwitz
Date: Sun Jan 20 11:55:37 2008
New Revision: 328

Modified:
   mod_parrot/trunk/CHANGES
   mod_parrot/trunk/src/mod_parrot.c

Log:
more fixes for x86_64


Modified: mod_parrot/trunk/CHANGES
==============================================================================
--- mod_parrot/trunk/CHANGES	(original)
+++ mod_parrot/trunk/CHANGES	Sun Jan 20 11:55:37 2008
@@ -2,6 +2,7 @@
 
 0.4    January 20, 2008
        * Support for Parrot 0.5.1 (Hatachi)
+       * Many fixes for 64-bit platforms
        * Begin transition to server-side tests
        * Keep testing infrastructure on make clean (versus distclean)
        * Update PIR syntax and types that have changed since mod_parrot 0.3

Modified: mod_parrot/trunk/src/mod_parrot.c
==============================================================================
--- mod_parrot/trunk/src/mod_parrot.c	(original)
+++ mod_parrot/trunk/src/mod_parrot.c	Sun Jan 20 11:55:37 2008
@@ -48,6 +48,12 @@
 /* we need to forward declare this */
 static apr_status_t modparrot_request_cleanup(void *data);
 
+/* XXX mod_parrot can crash on x86_64 w/o this.
+ * there's no prototype in the standard parrot includes, so compiler assumes
+ * return type of 'int', and sizeof(int) != sizeof(pointer) on x86_64.
+ */
+Parrot_PMC Parrot_Class_instantiate(PARROT_INTERP, PMC *, PMC *init);
+
 static Parrot_Interp modparrot_init(modparrot_context *ctx, server_rec *s)
 {
     Parrot_Interp interp;
@@ -148,10 +154,9 @@
     ctx_class = Parrot_oo_get_class(interp, namespace);
     Parrot_unregister_pmc(interp, namespace);
 
-    ctx_pmc = (Parrot_PMC)Parrot_Class_instantiate(interp, ctx_class, PMCNULL);
+    ctx_pmc = Parrot_Class_instantiate(interp, ctx_class, PMCNULL);
     Parrot_register_pmc(interp, ctx_pmc);
 
-
     if (!hll) hll = MODPARROT_DEFAULT_HLL;
     res = modparrot_call_sub_IPS(interp, hll, hll_handler, ret, ctx_pmc,
         handler);