diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-08-05 03:17:20 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-08-05 03:17:20 +0000 |
commit | ff875642fb93529394d9c68e02de7dfb16e28ea6 (patch) | |
tree | 04e8903f1369b059c8f10c98eca23b672a305a2c /hv.c | |
parent | cce850e4f65d092b5704ab42116f11f5188dd74e (diff) | |
download | perl-ff875642fb93529394d9c68e02de7dfb16e28ea6.tar.gz |
Little pointer juggling for HP-UX cc to avoid
"warning 524: Cast (non-lvalue) appears on left-hand side of assignment."
followed by
"error 1549: Modifiable lvalue required for assignment operator."
p4raw-id: //depot/perl@11578
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1191,7 +1191,9 @@ Perl_newHVhv(pTHX_ HV *ohv) /* It's an ordinary hash, so copy it fast. AMS 20010804 */ int i, shared = !!HvSHAREKEYS(ohv); HE **ents, **oents = (HE **)HvARRAY(ohv); - New(0, (char *)ents, PERL_HV_ARRAY_ALLOC_BYTES(hv_max+1), char); + char *a; + New(0, a, PERL_HV_ARRAY_ALLOC_BYTES(hv_max+1), char); + ents = (HE**)a; /* In each bucket... */ for (i = 0; i <= hv_max; i++) { |