Much wider support for Catacomb in all its glory.
[catacomb-perl] / pgproc.c
index b3818ef..ef2b272 100644 (file)
--- a/pgproc.c
+++ b/pgproc.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: pgproc.c,v 1.2 2004/04/08 01:36:21 mdw Exp $
+ * $Id$
  *
  * Prime generation procedures
  *
@@ -41,12 +41,12 @@ static int perlevent(int rq, pgen_event *e, void *p)
   dSP;
 
   switch (rq) {
-    case PGEN_BEGIN:   meth = "pgen_begin"; break;
-    case PGEN_TRY:     meth = "pgen_try"; break;
-    case PGEN_FAIL:    meth = "pgen_fail"; break;
-    case PGEN_PASS:    meth = "pgen_pass"; break;
-    case PGEN_DONE:    meth = "pgen_done"; break;
-    case PGEN_ABORT:   meth = "pgen_abort"; break;
+    case PGEN_BEGIN:   meth = "PG_BEGIN"; break;
+    case PGEN_TRY:     meth = "PG_TRY"; break;
+    case PGEN_FAIL:    meth = "PG_FAIL"; break;
+    case PGEN_PASS:    meth = "PG_PASS"; break;
+    case PGEN_DONE:    meth = "PG_DONE"; break;
+    case PGEN_ABORT:   meth = "PG_ABORT"; break;
     default:
       abort();
   }
@@ -55,8 +55,7 @@ static int perlevent(int rq, pgen_event *e, void *p)
   SAVETMPS;
   PUSHMARK(SP);
   XPUSHs(sv);
-  XPUSHs(sv_setref_pv(sv_newmortal(), "Catacomb::MP::Prime::Gen::Event",
-                     (void *)e));
+  XPUSHs(RET(e, "Catacomb::MP::Prime::Gen::Event"));
   PUTBACK;
   n = perl_call_method(meth, G_SCALAR);
   assert(n == 1);