From 51a5b41d49a28f8872b743cf944da3d6170e7ce8 Mon Sep 17 00:00:00 2001 From: Steve Hay Date: Fri, 20 Jul 2007 09:05:32 +0000 Subject: [PATCH] Re-apply #31429, which was accidentally undone by #31632 (and bump the $VERSION this time too). p4raw-id: //depot/perl@31643 --- ext/Hash/Util/FieldHash/FieldHash.xs | 32 +++++++++++----------- ext/Hash/Util/FieldHash/lib/Hash/Util/FieldHash.pm | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ext/Hash/Util/FieldHash/FieldHash.xs b/ext/Hash/Util/FieldHash/FieldHash.xs index 30e5cb9..f5921f3 100644 --- a/ext/Hash/Util/FieldHash/FieldHash.xs +++ b/ext/Hash/Util/FieldHash/FieldHash.xs @@ -233,22 +233,6 @@ I32 HUF_watch_key_id(pTHX_ IV action, SV* field) { return 0; } -/* see if something is a field hash */ -int HUF_get_status(HV* hash) { - int ans = 0; - if (hash && (SvTYPE(hash) == SVt_PVHV)) { - MAGIC* mg; - struct ufuncs* uf; - if ((mg = mg_find((SV*)hash, PERL_MAGIC_uvar)) && - (uf = (struct ufuncs *)mg->mg_ptr) && - (uf->uf_set == NULL) - ) { - ans = HUF_func_2mode(uf->uf_val); - } - } - return ans; -} - int HUF_func_2mode( I32(* val)(pTHX_ IV, SV*)) { int ans = 0; if (val == &HUF_watch_key_id) @@ -271,6 +255,22 @@ I32(* HUF_mode_2func( int mode))(pTHX_ IV, SV*) { return(ans); } +/* see if something is a field hash */ +int HUF_get_status(HV* hash) { + int ans = 0; + if (hash && (SvTYPE(hash) == SVt_PVHV)) { + MAGIC* mg; + struct ufuncs* uf; + if ((mg = mg_find((SV*)hash, PERL_MAGIC_uvar)) && + (uf = (struct ufuncs *)mg->mg_ptr) && + (uf->uf_set == NULL) + ) { + ans = HUF_func_2mode(uf->uf_val); + } + } + return ans; +} + /* Thread support. These routines are called by CLONE (and nothing else) */ /* Fix entries for one object in all field hashes */ diff --git a/ext/Hash/Util/FieldHash/lib/Hash/Util/FieldHash.pm b/ext/Hash/Util/FieldHash/lib/Hash/Util/FieldHash.pm index 4e7a198..329c56e 100644 --- a/ext/Hash/Util/FieldHash/lib/Hash/Util/FieldHash.pm +++ b/ext/Hash/Util/FieldHash/lib/Hash/Util/FieldHash.pm @@ -5,7 +5,7 @@ use strict; use warnings; use Scalar::Util qw( reftype); -our $VERSION = '1.02'; +our $VERSION = '1.02_01'; require Exporter; our @ISA = qw(Exporter); -- 2.7.4