actually add the test code
[poe-xs-queue-array.git] / Array.xs
index 4f67a59..6d515aa 100644 (file)
--- a/Array.xs
+++ b/Array.xs
@@ -4,6 +4,7 @@
 #include <string.h> /* for memmove() mostly */
 #include <errno.h> /* errno values */
 #include "queue.h"
+#include "alloc.h"
 
 /* this typedef lets the standard T_PTROBJ typemap handle the
 conversion between perl class and C type and back again */
@@ -110,7 +111,7 @@ pq_remove_items(pq, filter, ...)
           }
        }
        if (removed_entries)
-          free(removed_entries);
+          myfree(removed_entries);
 
 void
 pq_adjust_priority(pq, id, filter, delta)
@@ -165,9 +166,25 @@ pq_peek_items(pq, filter, ...)
            rv = newRV_noinc((SV *)av);
            PUSHs(sv_2mortal(rv));
          }
-          free(ret_items);
+          myfree(ret_items);
        }
 
 void
 pq_dump(pq)
        POE::XS::Queue::Array pq
+
+void
+pq_verify(pq)
+       POE::XS::Queue::Array pq
+
+# these are for testing errno is being set correctly for perl when
+# set from XS
+void
+pq__set_errno_xs(value)
+       int value
+      CODE:
+       errno = value;
+
+void
+pq__set_errno_queue(value)
+       int value