From 419956aa3919a2174e7f99c4d162e76cb94f0a9e Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sun, 31 Oct 2010 20:52:25 +0000 Subject: [PATCH] Storable::{last_op_in_netorder,is_storing,is_retrieving} are all boolean. Hence they can have return type bool, which allows xsubpp to generate slightly simpler (and smaller) code, and at run time avoids using a temporary for the return value. --- dist/Storable/Storable.xs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/Storable/Storable.xs b/dist/Storable/Storable.xs index 7ede03a..846a650 100644 --- a/dist/Storable/Storable.xs +++ b/dist/Storable/Storable.xs @@ -6417,23 +6417,23 @@ SV * sv OUTPUT: RETVAL -int +bool last_op_in_netorder() CODE: - RETVAL = last_op_in_netorder(aTHX); + RETVAL = !!last_op_in_netorder(aTHX); OUTPUT: RETVAL -int +bool is_storing() CODE: - RETVAL = is_storing(aTHX); + RETVAL = !!is_storing(aTHX); OUTPUT: RETVAL -int +bool is_retrieving() CODE: - RETVAL = is_retrieving(aTHX); + RETVAL = !!is_retrieving(aTHX); OUTPUT: RETVAL -- 2.7.4