Merge Storable::{is_storing,is_retrieving} using ALIAS.
authorNicholas Clark <nick@ccl4.org>
Sun, 31 Oct 2010 21:20:08 +0000 (21:20 +0000)
committerNicholas Clark <nick@ccl4.org>
Sun, 31 Oct 2010 21:22:23 +0000 (21:22 +0000)
dist/Storable/Storable.xs

index 846a650..2853657 100644 (file)
@@ -6426,14 +6426,14 @@ last_op_in_netorder()
 
 bool
 is_storing()
+ ALIAS:
+ is_storing = ST_STORE
+ is_retrieving = ST_RETRIEVE
  CODE:
-  RETVAL = !!is_storing(aTHX);
- OUTPUT:
-  RETVAL
+ {
+  dSTCXT;
 
-bool
-is_retrieving()
- CODE:
-  RETVAL = !!is_retrieving(aTHX);
+  RETVAL = cxt->entry && (cxt->optype & ix) ? TRUE : FALSE;
+ }
  OUTPUT:
   RETVAL