[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH]fixing the long long problem for the perl-swig bindings.

From: Patrick Mayweg <mayweg_at_qint.de>
Date: 2004-03-17 12:57:33 CET

Hi,
the problem with using the non standard types "long long" and "unsigned
long long" happens also to be in subversion/bindings/swig/swigutil_pl.c.
This patch replace all the system dependend types and printf format
strings with the apr types and macros.
[[
 * swigutil.c (svn_swig_pl_callback_thunk)
    replace the non standard types and printf format string with their
apr counterparts
]]

Index: swigutil_pl.c
===================================================================
--- swigutil_pl.c (revision 9065)
+++ swigutil_pl.c (working copy)
@@ -312,14 +312,14 @@
          * it available as a string. If not then perl will convert
          * it to an IV for us. So this handles the problem gracefully */
         c = malloc(30);
- snprintf(c,30,"%lld",va_arg(ap, long long));
+ snprintf(c,30,"%" APR_INT64_T_FMT,va_arg(ap, apr_int64_t));
         XPUSHs(sv_2mortal(newSVpv(c, 0)));
         free(c);
         break;
        
     case 'U': /* unsigned long long */
         c = malloc(30);
- snprintf(c,30,"%llu",va_arg(ap, unsigned long long));
+ snprintf(c,30,"%"APR_INT64_T_FMT,va_arg(ap, apr_uint64_t));
         XPUSHs(sv_2mortal(newSVpv(c, 0)));
         free(c);
         break;

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 17 12:52:39 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.