return status == 0;
}
-/*
- * pstore
- *
- * Store the transitive data closure of given object to disk.
- * Returns 0 on error, a true value otherwise.
- */
-static int pstore(pTHX_ PerlIO *f, SV *sv)
-{
- TRACEME(("pstore"));
- return do_store(aTHX_ f, sv, 0, FALSE, (SV**) 0);
-
-}
-
-/*
- * net_pstore
- *
- * Same as pstore(), but network order is used for integers and doubles are
- * emitted as strings.
- */
-static int net_pstore(pTHX_ PerlIO *f, SV *sv)
-{
- TRACEME(("net_pstore"));
- return do_store(aTHX_ f, sv, 0, TRUE, (SV**) 0);
-}
-
/***
*** Memory stores.
***/
return newSVpv(mbase, MBUF_SIZE());
}
-/*
- * mstore
- *
- * Store the transitive data closure of given object to memory.
- * Returns undef on error, a scalar value containing the data otherwise.
- */
-static SV *mstore(pTHX_ SV *sv)
-{
- SV *out;
-
- TRACEME(("mstore"));
-
- if (!do_store(aTHX_ (PerlIO*) 0, sv, 0, FALSE, &out))
- return &PL_sv_undef;
-
- return out;
-}
-
-/*
- * net_mstore
- *
- * Same as mstore(), but network order is used for integers and doubles are
- * emitted as strings.
- */
-static SV *net_mstore(pTHX_ SV *sv)
-{
- SV *out;
-
- TRACEME(("net_mstore"));
-
- if (!do_store(aTHX_ (PerlIO*) 0, sv, 0, TRUE, &out))
- return &PL_sv_undef;
-
- return out;
-}
-
/***
*** Specific retrieve callbacks.
***/
CODE:
init_perinterp(aTHX);
+# pstore
+#
+# Store the transitive data closure of given object to disk.
+# Returns 0 on error, a true value otherwise.
+
+# net_pstore
+#
+# Same as pstore(), but network order is used for integers and doubles are
+# emitted as strings.
+
int
pstore(f,obj)
OutputStream f
SV * obj
+ ALIAS:
+ net_pstore = 1
CODE:
- RETVAL = pstore(aTHX_ f, obj);
+ RETVAL = do_store(aTHX_ f, obj, 0, ix, (SV **)0);
OUTPUT:
RETVAL
-int
-net_pstore(f,obj)
-OutputStream f
-SV * obj
- CODE:
- RETVAL = net_pstore(aTHX_ f, obj);
- OUTPUT:
- RETVAL
+# mstore
+#
+# Store the transitive data closure of given object to memory.
+# Returns undef on error, a scalar value containing the data otherwise.
-SV *
-mstore(obj)
-SV * obj
- CODE:
- RETVAL = mstore(aTHX_ obj);
- OUTPUT:
- RETVAL
+# net_mstore
+#
+# Same as mstore(), but network order is used for integers and doubles are
+# emitted as strings.
SV *
-net_mstore(obj)
+mstore(obj)
SV * obj
+ ALIAS:
+ net_mstore = 1
CODE:
- RETVAL = net_mstore(aTHX_ obj);
+ if (!do_store(aTHX_ (PerlIO*) 0, obj, 0, ix, &RETVAL))
+ RETVAL = &PL_sv_undef;
OUTPUT:
RETVAL