Various changes. Kinda in the middle of it here, but it seems to work.
[catacomb-perl] / mp.xs
diff --git a/mp.xs b/mp.xs
index 5d78908..28c22f9 100644 (file)
--- a/mp.xs
+++ b/mp.xs
@@ -176,7 +176,7 @@ binop(a, b)
        XSINTERFACE_FUNC
        XSINTERFACE_FUNC_SETMP
        INTERFACE:
-       add sub mul and or xor
+       add sub mul and2c or2c nand2c nor2c xor2c and or nand nor xor
 
 mp *
 shiftop(a, n)
@@ -188,7 +188,29 @@ shiftop(a, n)
        XSINTERFACE_FUNC
        XSINTERFACE_FUNC_SETMP
        INTERFACE:
-       lsl lsr
+       lsl lsr lsl2c lsr2c
+
+bool
+testbitop(a, n)
+       mp *a
+       unsigned long n
+       INTERFACE_MACRO:
+       XSINTERFACE_FUNC
+       XSINTERFACE_FUNC_SETMP
+       INTERFACE:
+       testbit testbit2c
+
+mp *
+flipbits(a, n)
+       mp *a
+       unsigned long n
+       C_ARGS:
+       MP_NEW, a, n
+       INTERFACE_MACRO:
+       XSINTERFACE_FUNC
+       XSINTERFACE_FUNC_SETMP
+       INTERFACE:
+       setbit clearbit setbit2c clearbit2c
 
 int
 mp_cmp(a, b)