json_parse()/pgtypes: Fix accidental creation of read-only array/hash values
&PL_sv_* shouldn't be used when constructing arrays or hashes in this context.
This commit is contained in:
parent
817fa600d0
commit
d0c5397e2d
8 changed files with 45 additions and 11 deletions
6
FU.xs
6
FU.xs
|
|
@ -20,6 +20,12 @@
|
|||
#ifndef BOOL_INTERNALS_sv_isbool_true
|
||||
#define BOOL_INTERNALS_sv_isbool_true(x) SvTRUEx(x)
|
||||
#endif
|
||||
#ifndef newSV_true
|
||||
#define newSV_true() newSVsv(&PL_sv_yes)
|
||||
#endif
|
||||
#ifndef newSV_false
|
||||
#define newSV_false() newSVsv(&PL_sv_no)
|
||||
#endif
|
||||
|
||||
/* Disable key/value struct packing in khashl, so we can safely take a pointer
|
||||
* to values inside the hash table. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue