This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Extraneous warning for (?()A|B)
[perl5.git]
/
hv.h
diff --git
a/hv.h
b/hv.h
index
7c04cc2
..
466f33d
100644
(file)
--- a/
hv.h
+++ b/
hv.h
@@
-1,6
+1,6
@@
/* hv.h
*
/* hv.h
*
- * Copyright (c) 1991-199
4
, Larry Wall
+ * Copyright (c) 1991-199
7
, Larry Wall
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
@@
-22,11
+22,12
@@
struct hek {
char hek_key[1];
};
char hek_key[1];
};
+/* This structure must match the beginning of struct xpvmg in sv.h. */
struct xpvhv {
char * xhv_array; /* pointer to malloced string */
STRLEN xhv_fill; /* how full xhv_array currently is */
STRLEN xhv_max; /* subscript of last element of xhv_array */
struct xpvhv {
char * xhv_array; /* pointer to malloced string */
STRLEN xhv_fill; /* how full xhv_array currently is */
STRLEN xhv_max; /* subscript of last element of xhv_array */
- I
32
xhv_keys; /* how many elements in the array */
+ I
V
xhv_keys; /* how many elements in the array */
double xnv_nv; /* numeric value, if any */
MAGIC* xmg_magic; /* magic for scalar array */
HV* xmg_stash; /* class package */
double xnv_nv; /* numeric value, if any */
MAGIC* xmg_magic; /* magic for scalar array */
HV* xmg_stash; /* class package */
@@
-44,7
+45,7
@@
struct xpvhv {
register U32 hash_PeRlHaSh = 0; \
while (i_PeRlHaSh--) \
hash_PeRlHaSh = hash_PeRlHaSh * 33 + *s_PeRlHaSh++; \
register U32 hash_PeRlHaSh = 0; \
while (i_PeRlHaSh--) \
hash_PeRlHaSh = hash_PeRlHaSh * 33 + *s_PeRlHaSh++; \
- (hash) = hash_PeRlHaSh; \
+ (hash) = hash_PeRlHaSh
+ (hash_PeRlHaSh>>5)
; \
} STMT_END
} STMT_END
@@
-95,9
+96,11
@@
struct xpvhv {
#define HeKLEN(he) HEK_LEN(HeKEY_hek(he))
#define HeVAL(he) (he)->hent_val
#define HeHASH(he) HEK_HASH(HeKEY_hek(he))
#define HeKLEN(he) HEK_LEN(HeKEY_hek(he))
#define HeVAL(he) (he)->hent_val
#define HeHASH(he) HEK_HASH(HeKEY_hek(he))
-#define HePV(he) ((HeKLEN(he) == HEf_SVKEY) ? \
- SvPV(HeKEY_sv(he),na) : \
- HeKEY(he))
+#define HePV(he,lp) ((HeKLEN(he) == HEf_SVKEY) ? \
+ SvPV(HeKEY_sv(he),lp) : \
+ (((lp = HeKLEN(he)) >= 0) ? \
+ HeKEY(he) : Nullch))
+
#define HeSVKEY(he) ((HeKEY(he) && \
HeKLEN(he) == HEf_SVKEY) ? \
HeKEY_sv(he) : Nullsv)
#define HeSVKEY(he) ((HeKEY(he) && \
HeKLEN(he) == HEf_SVKEY) ? \
HeKEY_sv(he) : Nullsv)
@@
-107,8
+110,8
@@
struct xpvhv {
HeKEY_sv(he) : \
sv_2mortal(newSVpv(HeKEY(he), \
HeKLEN(he)))) : \
HeKEY_sv(he) : \
sv_2mortal(newSVpv(HeKEY(he), \
HeKLEN(he)))) : \
- &sv_undef)
-#define HeSVKEY_set(he,sv) (
HeKEY_sv(he) = sv
)
+ &
PL_
sv_undef)
+#define HeSVKEY_set(he,sv) (
(HeKLEN(he) = HEf_SVKEY), (HeKEY_sv(he) = sv)
)
#define Nullhek Null(HEK*)
#define HEK_BASESIZE STRUCT_OFFSET(HEK, hek_key[0])
#define Nullhek Null(HEK*)
#define HEK_BASESIZE STRUCT_OFFSET(HEK, hek_key[0])