summaryrefslogtreecommitdiff
path: root/deb.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-07-12 01:55:15 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-07-12 01:55:15 +0000
commitc5be433b5c5658093bc9cae4434721a0b63e7a85 (patch)
treeb5e25d83702fd5b6ebb6108c8cdf104a09f97040 /deb.c
parented7ab888f26e9b2a3bcf98806b630e993179f8b4 (diff)
downloadperl-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 'deb.c')
-rw-r--r--deb.c31
1 files changed, 26 insertions, 5 deletions
diff --git a/deb.c b/deb.c
index 252bb0b8df..b6456e6485 100644
--- a/deb.c
+++ b/deb.c
@@ -16,12 +16,36 @@
#define PERL_IN_DEB_C
#include "perl.h"
+#if defined(PERL_IMPLICIT_CONTEXT)
+void
+Perl_deb_nocontext(const char *pat, ...)
+{
+#ifdef DEBUGGING
+ dTHX;
+ va_list args;
+ va_start(args, pat);
+ vdeb(pat, &args);
+ va_end(args);
+#endif /* DEBUGGING */
+}
+#endif
+
void
Perl_deb(pTHX_ const char *pat, ...)
{
#ifdef DEBUGGING
- dTHR;
va_list args;
+ va_start(args, pat);
+ vdeb(pat, &args);
+ va_end(args);
+#endif /* DEBUGGING */
+}
+
+void
+Perl_vdeb(pTHX_ const char *pat, va_list *args)
+{
+#ifdef DEBUGGING
+ dTHR;
register I32 i;
GV* gv = PL_curcop->cop_filegv;
@@ -37,10 +61,7 @@ Perl_deb(pTHX_ const char *pat, ...)
#endif /* USE_THREADS */
for (i=0; i<PL_dlevel; i++)
PerlIO_printf(Perl_debug_log, "%c%c ",PL_debname[i],PL_debdelim[i]);
-
- va_start(args, pat);
- (void) PerlIO_vprintf(Perl_debug_log,pat,args);
- va_end( args );
+ (void) PerlIO_vprintf(Perl_debug_log, pat, *args);
#endif /* DEBUGGING */
}