From: Nicholas Clark Date: Mon, 24 Nov 2008 18:48:43 +0000 (+0000) Subject: Promote Perl_setdefout() to the public API. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8226a3d7ea7a9414bc41d73011d23876bd55e4b8;p=p5sagit%2Fp5-mst-13.2.git Promote Perl_setdefout() to the public API. p4raw-id: //depot/perl@34904 --- diff --git a/embed.fnc b/embed.fnc index 7d0f681..0254a57 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 d246290..2fb6296 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 5cab290..f9eda90 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 + +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 11cd863..192ce6c 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) {