Fix compiler warning in hv.c on MSWin32
authorJerry D. Hedden <jdhedden@cpan.org>
Wed, 1 Dec 2010 15:32:34 +0000 (10:32 -0500)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 1 Dec 2010 16:24:28 +0000 (08:24 -0800)
Fixes the following seen in a Steve Hay smoke test:

Compiler messages(MSWin32):
..\hv.c(1646) : warning C4244: 'initializing' : conversion from 'unsigned long ' to 'const char ', possible loss of data

hv.c

diff --git a/hv.c b/hv.c
index d0f452e..d5e7a21 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -1643,7 +1643,7 @@ S_hfreeentries(pTHX_ HV *hv)
     /* This is the array that we're going to restore  */
     HE **const orig_array = HvARRAY(hv);
     HE **tmp_array = NULL;
-    const bool has_aux = SvOOK(hv);
+    const bool has_aux = (SvOOK(hv) == SVf_OOK);
     struct xpvhv_aux * current_aux = NULL;
     int attempts = 100;