dougm 01/11/06 10:39:41
Modified: src/modules/perl modperl_util.c modperl_util.h
Log:
add modperl_perl_do_sprintf function
Revision Changes Path
1.30 +16 -0 modperl-2.0/src/modules/perl/modperl_util.c
Index: modperl_util.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- modperl_util.c 2001/11/05 05:12:33 1.29
+++ modperl_util.c 2001/11/06 18:39:41 1.30
@@ -443,6 +443,22 @@
return 0;
}
+/* XXX: same as Perl_do_sprintf();
+ * but Perl_do_sprintf() is not part of the "public" api
+ */
+void modperl_perl_do_sprintf(pTHX_ SV *sv, I32 len, SV **sarg)
+{
+ STRLEN patlen;
+ char *pat = SvPV(*sarg, patlen);
+ bool do_taint = FALSE;
+
+ sv_vsetpvfn(sv, pat, patlen, Null(va_list*), sarg + 1, len - 1, &do_taint);
+ SvSETMAGIC(sv);
+ if (do_taint) {
+ SvTAINTED_on(sv);
+ }
+}
+
void modperl_perl_call_list(pTHX_ AV *subs, const char *name)
{
I32 i, oldscope = PL_scopestack_ix;
1.30 +2 -0 modperl-2.0/src/modules/perl/modperl_util.h
Index: modperl_util.h
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- modperl_util.h 2001/10/27 17:14:17 1.29
+++ modperl_util.h 2001/11/06 18:39:41 1.30
@@ -98,6 +98,8 @@
#define hv_fetch_he(hv,k,l,h) \
modperl_perl_hv_fetch_he(aTHX_ hv, k, l, h)
+void modperl_perl_do_sprintf(pTHX_ SV *sv, I32 len, SV **sarg);
+
void modperl_perl_call_list(pTHX_ AV *subs, const char *name);
void modperl_perl_exit(pTHX_ int status);