Author: nicholas
Date: Tue May  3 06:46:54 2005
New Revision: 7957

Modified:
   trunk/include/parrot/extend.h
   trunk/src/extend.c
Log:
Add 4 types of push to extend.h


Modified: trunk/include/parrot/extend.h
==============================================================================
--- trunk/include/parrot/extend.h       (original)
+++ trunk/include/parrot/extend.h       Tue May  3 06:46:54 2005
@@ -84,6 +84,10 @@
 void Parrot_PMC_set_intval_intkey(Parrot_INTERP, Parrot_PMC, Parrot_Int, 
Parrot_Int);
 void Parrot_PMC_set_numval(Parrot_INTERP, Parrot_PMC, Parrot_Float);
 void Parrot_PMC_set_numval_intkey(Parrot_INTERP, Parrot_PMC, Parrot_Int, 
Parrot_Float);
+void Parrot_PMC_push_intval(Parrot_INTERP, Parrot_PMC, Parrot_Int);
+void Parrot_PMC_push_numval(Parrot_INTERP, Parrot_PMC, Parrot_Float);
+void Parrot_PMC_push_string(Parrot_INTERP, Parrot_PMC, Parrot_STRING);
+void Parrot_PMC_push_pmc(Parrot_INTERP, Parrot_PMC, Parrot_PMC);
 
 Parrot_PMC Parrot_PMC_new(Parrot_INTERP, Parrot_Int);
 Parrot_PMC Parrot_PMC_null(void);

Modified: trunk/src/extend.c
==============================================================================
--- trunk/src/extend.c  (original)
+++ trunk/src/extend.c  Tue May  3 06:46:54 2005
@@ -547,6 +547,82 @@
 /*
 
 =item C<void
+Parrot_PMC_push_intval(Parrot_INTERP interp, Parrot_PMC pmc,
+                            Parrot_Int value)>
+
+Push the passed-in Parrot integer onto the passed in PMC
+
+=cut
+
+*/
+
+void Parrot_PMC_push_intval(Parrot_INTERP interp, Parrot_PMC pmc,
+                            Parrot_Int value) {
+    PARROT_CALLIN_START(interp);
+    VTABLE_push_integer(interp, pmc, value);
+    PARROT_CALLIN_END(interp);
+}
+
+/*
+
+=item C<void
+Parrot_PMC_push_numval(Parrot_INTERP interp, Parrot_PMC pmc,
+                            Parrot_Float value)>
+
+Push the passed-in Parrot number onto the passed in PMC
+
+=cut
+
+*/
+
+void Parrot_PMC_push_numval(Parrot_INTERP interp, Parrot_PMC pmc,
+                            Parrot_Float value) {
+    PARROT_CALLIN_START(interp);
+    VTABLE_push_float(interp, pmc, value);
+    PARROT_CALLIN_END(interp);
+}
+
+/*
+
+=item C<void
+Parrot_PMC_push_string(Parrot_INTERP interp, Parrot_PMC pmc,
+                            Parrot_Int value)>
+
+Push the passed-in Parrot string onto the passed in PMC
+
+=cut
+
+*/
+
+void Parrot_PMC_push_string(Parrot_INTERP interp, Parrot_PMC pmc,
+                            Parrot_STRING value) {
+    PARROT_CALLIN_START(interp);
+    VTABLE_push_string(interp, pmc, value);
+    PARROT_CALLIN_END(interp);
+}
+
+/*
+
+=item C<void
+Parrot_PMC_push_pmc(Parrot_INTERP interp, Parrot_PMC pmc,
+                    Parrot_PMC value)>
+
+Push the passed-in PMC onto the passed in PMC
+
+=cut
+
+*/
+
+void Parrot_PMC_push_pmc(Parrot_INTERP interp, Parrot_PMC pmc,
+                         Parrot_PMC value) {
+    PARROT_CALLIN_START(interp);
+    VTABLE_push_pmc(interp, pmc, value);
+    PARROT_CALLIN_END(interp);
+}
+
+/*
+
+=item C<void
 Parrot_PMC_set_cstringn_intkey(Parrot_INTERP interp, Parrot_PMC pmc,
                                Parrot_Int key,
                                const char *value, Parrot_Int length)>

Reply via email to