From: Nicholas Clark Date: Sun, 30 Oct 2005 08:05:32 +0000 (+0000) Subject: Replace do_open() with a macro to call do_openn() with the extra two X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e4dba78629baadf544a977b8105c4c2d93050b21;p=p5sagit%2Fp5-mst-13.2.git Replace do_open() with a macro to call do_openn() with the extra two 0 paramters. Move the old body to mathoms.c. p4raw-id: //depot/perl@25889 --- diff --git a/doio.c b/doio.c index 102a07a..c2867fb 100644 --- a/doio.c +++ b/doio.c @@ -59,14 +59,6 @@ #include bool -Perl_do_open(pTHX_ GV *gv, register const char *name, I32 len, int as_raw, - int rawmode, int rawperm, PerlIO *supplied_fp) -{ - return do_openn(gv, name, len, as_raw, rawmode, rawperm, - supplied_fp, (SV **) NULL, 0); -} - -bool Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw, int rawmode, int rawperm, PerlIO *supplied_fp, SV **svp, I32 num_svs) diff --git a/embed.fnc b/embed.fnc index d85bacd..842bb10 100644 --- a/embed.fnc +++ b/embed.fnc @@ -203,7 +203,7 @@ p |I32 |do_shmio |I32 optype|NN SV** mark|NN SV** sp #endif Ap |void |do_join |NN SV* sv|NN SV* del|NN SV** mark|NN SV** sp p |OP* |do_kv -Ap |bool |do_open |NN GV* gv|NN const char* name|I32 len|int as_raw \ +Apmb |bool |do_open |NN GV* gv|NN const char* name|I32 len|int as_raw \ |int rawmode|int rawperm|NULLOK PerlIO* supplied_fp Ap |bool |do_open9 |NN GV *gv|NN const char *name|I32 len|int as_raw \ |int rawmode|int rawperm|NULLOK PerlIO *supplied_fp \ diff --git a/embed.h b/embed.h index ac5c490..338fc14 100644 --- a/embed.h +++ b/embed.h @@ -194,7 +194,6 @@ #ifdef PERL_CORE #define do_kv Perl_do_kv #endif -#define do_open Perl_do_open #define do_open9 Perl_do_open9 #define do_openn Perl_do_openn #ifdef PERL_CORE @@ -2189,7 +2188,6 @@ #ifdef PERL_CORE #define do_kv() Perl_do_kv(aTHX) #endif -#define do_open(a,b,c,d,e,f,g) Perl_do_open(aTHX_ a,b,c,d,e,f,g) #define do_open9(a,b,c,d,e,f,g,h,i) Perl_do_open9(aTHX_ a,b,c,d,e,f,g,h,i) #define do_openn(a,b,c,d,e,f,g,h,i) Perl_do_openn(aTHX_ a,b,c,d,e,f,g,h,i) #ifdef PERL_CORE diff --git a/mathoms.c b/mathoms.c index f9eda30..eef80f5 100644 --- a/mathoms.c +++ b/mathoms.c @@ -604,6 +604,14 @@ Perl_av_fake(pTHX_ register I32 size, register SV **strp) } bool +Perl_do_open(pTHX_ GV *gv, register const char *name, I32 len, int as_raw, + int rawmode, int rawperm, PerlIO *supplied_fp) +{ + return do_openn(gv, name, len, as_raw, rawmode, rawperm, + supplied_fp, (SV **) NULL, 0); +} + +bool Perl_do_open9(pTHX_ GV *gv, register const char *name, I32 len, int as_raw, int rawmode, int rawperm, PerlIO *supplied_fp, SV *svs, @@ -628,7 +636,6 @@ Perl_do_binmode(pTHX_ PerlIO *fp, int iotype, int mode) return PerlIO_binmode(aTHX_ fp, iotype, mode, name); } - /* * Local variables: * c-indentation-style: bsd diff --git a/perl.h b/perl.h index 001bd69..a747539 100644 --- a/perl.h +++ b/perl.h @@ -5390,6 +5390,9 @@ extern void moncontrol(int); #pragma message disable (mainparm) /* Perl uses the envp in main(). */ #endif +#define do_open(g, n, l, a, rm, rp, sf) \ + do_openn(g, n, l, a, rm, rp, sf, (SV **) NULL, 0) + /* and finally... */ #define PERL_PATCHLEVEL_H_IMPLICIT #include "patchlevel.h" diff --git a/proto.h b/proto.h index 64db0d8..c660355 100644 --- a/proto.h +++ b/proto.h @@ -441,9 +441,9 @@ PERL_CALLCONV void Perl_do_join(pTHX_ SV* sv, SV* del, SV** mark, SV** sp) __attribute__nonnull__(pTHX_4); PERL_CALLCONV OP* Perl_do_kv(pTHX); -PERL_CALLCONV bool Perl_do_open(pTHX_ GV* gv, const char* name, I32 len, int as_raw, int rawmode, int rawperm, PerlIO* supplied_fp) +/* PERL_CALLCONV bool Perl_do_open(pTHX_ GV* gv, const char* name, I32 len, int as_raw, int rawmode, int rawperm, PerlIO* supplied_fp) __attribute__nonnull__(pTHX_1) - __attribute__nonnull__(pTHX_2); + __attribute__nonnull__(pTHX_2); */ PERL_CALLCONV bool Perl_do_open9(pTHX_ GV *gv, const char *name, I32 len, int as_raw, int rawmode, int rawperm, PerlIO *supplied_fp, SV *svs, I32 num) __attribute__nonnull__(pTHX_1)