On Wed, 19 Feb 2003, Rick Measham wrote:
> When I 'make':
>
> [makes directories and copies file around, then:]
>
> /usr/bin/perl -I/usr/libdata/perl/5.00503/mach -I/usr/libdata/perl/5.00503
> /usr/libdata/perl/5.00503/ExtUtils/xsubpp -typemap
> /usr/libdata/perl/5.00503/ExtUtils/typemap DateTime.xs >xstmp.c && mv
> xstmp.c DateTime.c
> Error: Cannot parse function definition from ' SV* days;' in
> DateTime.xs, line 179
> Error: Cannot parse function definition from ' SV* self;' in
> DateTime.xs, line 200
> Error: Cannot parse function definition from ' SV* self;' in
> DateTime.xs, line 210
> Please specify prototyping behavior for DateTime.xs (see perlxs manual)
> *** Error code 1
>
> Stop in /path/to/DateTime-0.06.
>
>
> Anyone help me with what is happening here, and specifically how I can fix
> it?
Apparently whitespace counts in XS! Patch below sig ;)
/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/
Index: DateTime.xs
===================================================================
RCS file: /cvsroot/perl-date-time/modules/DateTime.pm/DateTime.xs,v
retrieving revision 1.5
diff -u -u -r1.5 DateTime.xs
--- DateTime.xs 18 Feb 2003 23:19:49 -0000 1.5
+++ DateTime.xs 18 Feb 2003 23:40:33 -0000
@@ -177,7 +177,8 @@
PUSHs(sv_2mortal(newSViv(m)));
PUSHs(sv_2mortal(newSViv(s)));
-void _normalize_seconds(days, secs)
+void
+_normalize_seconds(days, secs)
SV* days;
SV* secs;
@@ -198,7 +199,8 @@
sv_setiv(days, (IV) d);
sv_setiv(secs, (IV) s);
-void _time_as_seconds(self, h, m, s)
+void
+_time_as_seconds(self, h, m, s)
SV* self;
IV h;
IV m;
@@ -208,7 +210,8 @@
EXTEND(SP, 1);
PUSHs(sv_2mortal(newSViv(h * 3600 + m * 60 + s)));
-void _is_leap_year(self, y)
+void
+_is_leap_year(self, y)
SV* self;
IV y;