summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Hay <SteveHay@planit.com>2007-06-20 16:07:06 +0000
committerSteve Hay <SteveHay@planit.com>2007-06-20 16:07:06 +0000
commit63f929f04e38717ddb137d7cd95564d619272d85 (patch)
tree18f94378b747439f1e74d096100b36deae733895
parent0a23e5bfd5c64a7864bfe5805f19af1e2e6d0a47 (diff)
downloadperl-63f929f04e38717ddb137d7cd95564d619272d85.tar.gz
Stop the VC++ warning "'HUF_func_2mode' undefined; assuming extern
returning int" by shuffling the functions around so that that function is defined before it is called (since there are no forward declarations of functions in this file) p4raw-id: //depot/perl@31429
-rw-r--r--ext/Hash/Util/FieldHash/FieldHash.xs32
1 files changed, 16 insertions, 16 deletions
diff --git a/ext/Hash/Util/FieldHash/FieldHash.xs b/ext/Hash/Util/FieldHash/FieldHash.xs
index 972f99dad3..98594f9883 100644
--- a/ext/Hash/Util/FieldHash/FieldHash.xs
+++ b/ext/Hash/Util/FieldHash/FieldHash.xs
@@ -236,22 +236,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)
@@ -274,6 +258,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 */