diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-07-12 01:55:15 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-07-12 01:55:15 +0000 |
commit | c5be433b5c5658093bc9cae4434721a0b63e7a85 (patch) | |
tree | b5e25d83702fd5b6ebb6108c8cdf104a09f97040 /sv.c | |
parent | ed7ab888f26e9b2a3bcf98806b630e993179f8b4 (diff) | |
download | perl-c5be433b5c5658093bc9cae4434721a0b63e7a85.tar.gz |
yet more cleanups of the PERL_OBJECT, MULTIPLICITY and USE_THREADS
builds; passing the implicit context is unified among the three
flavors; PERL_IMPLICIT_CONTEXT is auto-enabled under all three
flavors (see the top of perl.h) for testing; all varargs functions
foo() have a va_list-taking variant vfoo() for generating the
context-free versions; the PERL_OBJECT build should now be
hyper-compatible with CPAN extensions (C++ is totally out of
the picture)
result has only been tested on Windows
TODO: write docs on the THX rationale and idiomatic usage of
the Perl API
p4raw-id: //depot/perl@3667
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 58 |
1 files changed, 42 insertions, 16 deletions
@@ -3949,10 +3949,8 @@ Perl_newSVpvf_nocontext(const char* pat, ...) dTHX; register SV *sv; va_list args; - - new_SV(sv); va_start(args, pat); - sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); + sv = vnewSVpvf(pat, &args); va_end(args); return sv; } @@ -3963,15 +3961,22 @@ Perl_newSVpvf(pTHX_ const char* pat, ...) { register SV *sv; va_list args; - - new_SV(sv); va_start(args, pat); - sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); + sv = vnewSVpvf(pat, &args); va_end(args); return sv; } SV * +Perl_vnewSVpvf(pTHX_ const char* pat, va_list* args) +{ + register SV *sv; + new_SV(sv); + sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); + return sv; +} + +SV * Perl_newSVnv(pTHX_ NV n) { register SV *sv; @@ -4579,7 +4584,7 @@ Perl_sv_setpvf_nocontext(SV *sv, const char* pat, ...) dTHX; va_list args; va_start(args, pat); - sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); + sv_vsetpvf(sv, pat, &args); va_end(args); } @@ -4590,9 +4595,8 @@ Perl_sv_setpvf_mg_nocontext(SV *sv, const char* pat, ...) dTHX; va_list args; va_start(args, pat); - sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); + sv_vsetpvf_mg(sv, pat, &args); va_end(args); - SvSETMAGIC(sv); } #endif @@ -4601,18 +4605,29 @@ Perl_sv_setpvf(pTHX_ SV *sv, const char* pat, ...) { va_list args; va_start(args, pat); - sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); + sv_vsetpvf(sv, pat, &args); va_end(args); } +void +Perl_sv_vsetpvf(pTHX_ SV *sv, const char* pat, va_list* args) +{ + sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); +} void Perl_sv_setpvf_mg(pTHX_ SV *sv, const char* pat, ...) { va_list args; va_start(args, pat); - sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); + sv_vsetpvf_mg(sv, pat, &args); va_end(args); +} + +void +Perl_sv_vsetpvf_mg(pTHX_ SV *sv, const char* pat, va_list* args) +{ + sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); SvSETMAGIC(sv); } @@ -4623,7 +4638,7 @@ Perl_sv_catpvf_nocontext(SV *sv, const char* pat, ...) dTHX; va_list args; va_start(args, pat); - sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); + sv_vcatpvf(sv, pat, &args); va_end(args); } @@ -4633,9 +4648,8 @@ Perl_sv_catpvf_mg_nocontext(SV *sv, const char* pat, ...) dTHX; va_list args; va_start(args, pat); - sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); + sv_vcatpvf_mg(sv, pat, &args); va_end(args); - SvSETMAGIC(sv); } #endif @@ -4644,17 +4658,29 @@ Perl_sv_catpvf(pTHX_ SV *sv, const char* pat, ...) { va_list args; va_start(args, pat); - sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); + sv_vcatpvf(sv, pat, &args); va_end(args); } void +Perl_sv_vcatpvf(pTHX_ SV *sv, const char* pat, va_list* args) +{ + sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); +} + +void Perl_sv_catpvf_mg(pTHX_ SV *sv, const char* pat, ...) { va_list args; va_start(args, pat); - sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); + sv_vcatpvf_mg(sv, pat, &args); va_end(args); +} + +void +Perl_sv_vcatpvf_mg(pTHX_ SV *sv, const char* pat, va_list* args) +{ + sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); SvSETMAGIC(sv); } |