Skip to content

Commit

Permalink
Move Perl_newIO() from mathoms to macro in sv.h
Browse files Browse the repository at this point in the history
  • Loading branch information
khwilliamson committed Nov 17, 2024
1 parent 354c4cb commit f841c17
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion embed.fnc
Original file line number Diff line number Diff line change
Expand Up @@ -2209,7 +2209,7 @@ ARdp |OP * |newGVREF |I32 type \
ARdmp |HV * |newHV
ARdp |HV * |newHVhv |NULLOK HV *hv
ARdp |OP * |newHVREF |NN OP *o
AMRbdp |IO * |newIO
ARdmp |IO * |newIO
ARdp |OP * |newLISTOP |I32 type \
|I32 flags \
|NULLOK OP *first \
Expand Down
1 change: 1 addition & 0 deletions embed.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@
# define newHV() Perl_newHV(aTHX)
# define newHVREF(a) Perl_newHVREF(aTHX_ a)
# define newHVhv(a) Perl_newHVhv(aTHX_ a)
# define newIO() Perl_newIO(aTHX)
# define newLISTOP(a,b,c,d) Perl_newLISTOP(aTHX_ a,b,c,d)
# define newLISTOPn(a,...) Perl_newLISTOPn(aTHX_ a,__VA_ARGS__)
# define newLOGOP(a,b,c,d) Perl_newLOGOP(aTHX_ a,b,c,d)
Expand Down
6 changes: 0 additions & 6 deletions mathoms.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,6 @@ Perl_sv_nounlocking(pTHX_ SV *sv)
PERL_UNUSED_ARG(sv);
}

IO *
Perl_newIO(pTHX)
{
return MUTABLE_IO(newSV_type(SVt_PVIO));
}

I32
Perl_my_stat(pTHX)
{
Expand Down
9 changes: 4 additions & 5 deletions proto.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2731,7 +2731,7 @@ Create a new IO, setting the reference count to 1.
=cut
*/
#define newIO() MUTABLE_IO(newSV_type(SVt_PVIO))
#define Perl_newIO(mTHX) MUTABLE_IO(Perl_newSV_type(aTHX_ SVt_PVIO))

#if defined(PERL_CORE) || defined(PERL_EXT)

Expand Down

0 comments on commit f841c17

Please sign in to comment.