summaryrefslogtreecommitdiff
path: root/pkgtools/p5-pkgsrc-Dewey/files/Dewey.xs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgtools/p5-pkgsrc-Dewey/files/Dewey.xs')
-rw-r--r--pkgtools/p5-pkgsrc-Dewey/files/Dewey.xs31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgtools/p5-pkgsrc-Dewey/files/Dewey.xs b/pkgtools/p5-pkgsrc-Dewey/files/Dewey.xs
new file mode 100644
index 00000000000..9c696ab5794
--- /dev/null
+++ b/pkgtools/p5-pkgsrc-Dewey/files/Dewey.xs
@@ -0,0 +1,31 @@
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#include <dewey.h>
+
+MODULE = pkgsrc::Dewey PACKAGE = pkgsrc::Dewey
+
+int
+dewey_match(pattern, package)
+ const char * pattern
+ const char * package
+ PROTOTYPE: $;$
+ OUTPUT:
+ RETVAL
+
+int
+dewey_cmp(lhs, op, rhs)
+ const char * lhs
+ const char * op
+ const char * rhs
+ PROTOTYPE: $;$;$
+ INIT:
+ int opi;
+ CODE:
+ if (dewey_mktest(&opi, op) < 0)
+ RETVAL = -1;
+ else
+ RETVAL = dewey_cmp(lhs, opi, rhs);
+ OUTPUT:
+ RETVAL