summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embed.fnc2
-rw-r--r--embed.h4
-rw-r--r--pod/perlapi.pod21
-rw-r--r--pp_sys.c11
4 files changed, 33 insertions, 5 deletions
diff --git a/embed.fnc b/embed.fnc
index 7d0f681531..0254a57dd3 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -826,7 +826,7 @@ Ap |char* |screaminstr |NN SV *bigstr|NN SV *littlestr|I32 start_shift \
#if !defined(VMS)
p |I32 |setenv_getix |NN const char* nam
#endif
-EXp |void |setdefout |NULLOK GV* gv
+Apd |void |setdefout |NULLOK GV* gv
Ap |HEK* |share_hek |NN const char* str|I32 len|U32 hash
#if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
np |Signal_t |sighandler |int sig|NULLOK siginfo_t *info|NULLOK void *uap
diff --git a/embed.h b/embed.h
index d24629009b..2fb6296f41 100644
--- a/embed.h
+++ b/embed.h
@@ -812,9 +812,7 @@
#define setenv_getix Perl_setenv_getix
#endif
#endif
-#if defined(PERL_CORE) || defined(PERL_EXT)
#define setdefout Perl_setdefout
-#endif
#define share_hek Perl_share_hek
#if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
#ifdef PERL_CORE
@@ -3128,9 +3126,7 @@
#define setenv_getix(a) Perl_setenv_getix(aTHX_ a)
#endif
#endif
-#if defined(PERL_CORE) || defined(PERL_EXT)
#define setdefout(a) Perl_setdefout(aTHX_ a)
-#endif
#define share_hek(a,b,c) Perl_share_hek(aTHX_ a,b,c)
#if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
#ifdef PERL_CORE
diff --git a/pod/perlapi.pod b/pod/perlapi.pod
index 5cab290344..f9eda9091b 100644
--- a/pod/perlapi.pod
+++ b/pod/perlapi.pod
@@ -1232,6 +1232,27 @@ Found in file pp_pack.c
=back
+=head1 Functions in file pp_sys.c
+
+
+=over 8
+
+=item setdefout
+X<setdefout>
+
+Sets PL_defoutgv, the default file handle for output, to the passed in
+typeglob. As PL_defoutgv "owns" a reference on its typeglob, the reference
+count of the passed in typeglob is increased by one, and the reference count
+of the typeglob that PL_defoutgv points to is decreased by one.
+
+ void setdefout(GV* gv)
+
+=for hackers
+Found in file pp_sys.c
+
+
+=back
+
=head1 GV Functions
=over 8
diff --git a/pp_sys.c b/pp_sys.c
index 11cd863470..192ce6c01e 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1156,6 +1156,17 @@ PP(pp_sselect)
#endif
}
+/*
+=for apidoc setdefout
+
+Sets PL_defoutgv, the default file handle for output, to the passed in
+typeglob. As PL_defoutgv "owns" a reference on its typeglob, the reference
+count of the passed in typeglob is increased by one, and the reference count
+of the typeglob that PL_defoutgv points to is decreased by one.
+
+=cut
+*/
+
void
Perl_setdefout(pTHX_ GV *gv)
{