mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 08:38:23 +00:00
Move the macros which wrap sv_dup_inc() into sv.h
This commit is contained in:
parent
3475eb469d
commit
45826d9c09
2
pad.c
2
pad.c
@ -2477,8 +2477,6 @@ Perl_pad_push(pTHX_ PADLIST *padlist, int depth)
|
||||
|
||||
#if defined(USE_ITHREADS)
|
||||
|
||||
# define av_dup_inc(s,t) MUTABLE_AV(sv_dup_inc((const SV *)s,t))
|
||||
|
||||
/*
|
||||
=for apidoc padlist_dup
|
||||
|
||||
|
||||
@ -13366,8 +13366,6 @@ Perl_regfree_internal(pTHX_ REGEXP * const rx)
|
||||
Safefree(ri);
|
||||
}
|
||||
|
||||
#define av_dup_inc(s, t) MUTABLE_AV(sv_dup_inc((const SV *)s, t))
|
||||
#define hv_dup_inc(s, t) MUTABLE_HV(sv_dup_inc((const SV *)s, t))
|
||||
#define SAVEPVN(p, n) ((p) ? savepvn(p, n) : NULL)
|
||||
|
||||
/*
|
||||
|
||||
15
sv.c
15
sv.c
@ -13781,21 +13781,6 @@ ptr_table_* functions.
|
||||
#endif
|
||||
|
||||
|
||||
/* Certain cases in Perl_ss_dup have been merged, by relying on the fact
|
||||
that currently av_dup, gv_dup and hv_dup are the same as sv_dup.
|
||||
If this changes, please unmerge ss_dup.
|
||||
Likewise, sv_dup_inc_multiple() relies on this fact. */
|
||||
#define sv_dup_inc_NN(s,t) SvREFCNT_inc_NN(sv_dup_inc(s,t))
|
||||
#define av_dup(s,t) MUTABLE_AV(sv_dup((const SV *)s,t))
|
||||
#define av_dup_inc(s,t) MUTABLE_AV(sv_dup_inc((const SV *)s,t))
|
||||
#define hv_dup(s,t) MUTABLE_HV(sv_dup((const SV *)s,t))
|
||||
#define hv_dup_inc(s,t) MUTABLE_HV(sv_dup_inc((const SV *)s,t))
|
||||
#define cv_dup(s,t) MUTABLE_CV(sv_dup((const SV *)s,t))
|
||||
#define cv_dup_inc(s,t) MUTABLE_CV(sv_dup_inc((const SV *)s,t))
|
||||
#define io_dup(s,t) MUTABLE_IO(sv_dup((const SV *)s,t))
|
||||
#define io_dup_inc(s,t) MUTABLE_IO(sv_dup_inc((const SV *)s,t))
|
||||
#define gv_dup(s,t) MUTABLE_GV(sv_dup((const SV *)s,t))
|
||||
#define gv_dup_inc(s,t) MUTABLE_GV(sv_dup_inc((const SV *)s,t))
|
||||
#define SAVEPV(p) ((p) ? savepv(p) : NULL)
|
||||
#define SAVEPVN(p,n) ((p) ? savepvn(p,n) : NULL)
|
||||
|
||||
|
||||
18
sv.h
18
sv.h
@ -2672,6 +2672,24 @@ Create a new IO, setting the reference count to 1.
|
||||
- STRUCT_OFFSET(XPVNV, xnv_u.xnv_nv)); \
|
||||
} STMT_END
|
||||
|
||||
#if defined(PERL_CORE) && defined(USE_ITHREADS)
|
||||
/* Certain cases in Perl_ss_dup have been merged, by relying on the fact
|
||||
that currently av_dup, gv_dup and hv_dup are the same as sv_dup.
|
||||
If this changes, please unmerge ss_dup.
|
||||
Likewise, sv_dup_inc_multiple() relies on this fact. */
|
||||
# define sv_dup_inc_NN(s,t) SvREFCNT_inc_NN(sv_dup_inc(s,t))
|
||||
# define av_dup(s,t) MUTABLE_AV(sv_dup((const SV *)s,t))
|
||||
# define av_dup_inc(s,t) MUTABLE_AV(sv_dup_inc((const SV *)s,t))
|
||||
# define hv_dup(s,t) MUTABLE_HV(sv_dup((const SV *)s,t))
|
||||
# define hv_dup_inc(s,t) MUTABLE_HV(sv_dup_inc((const SV *)s,t))
|
||||
# define cv_dup(s,t) MUTABLE_CV(sv_dup((const SV *)s,t))
|
||||
# define cv_dup_inc(s,t) MUTABLE_CV(sv_dup_inc((const SV *)s,t))
|
||||
# define io_dup(s,t) MUTABLE_IO(sv_dup((const SV *)s,t))
|
||||
# define io_dup_inc(s,t) MUTABLE_IO(sv_dup_inc((const SV *)s,t))
|
||||
# define gv_dup(s,t) MUTABLE_GV(sv_dup((const SV *)s,t))
|
||||
# define gv_dup_inc(s,t) MUTABLE_GV(sv_dup_inc((const SV *)s,t))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ex: set ts=8 sts=4 sw=4 et:
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user