Commit | Line | Data |
302d38aa |
1 | #ifdef __cplusplus |
2 | #extern "C" { |
3 | #endif |
4 | #include "EXTERN.h" |
5 | #include "perl.h" |
6 | #include "XSUB.h" |
7 | #include <time.h> |
8 | #ifdef __cplusplus |
9 | } |
10 | #endif |
11 | |
12 | MODULE = Time::Piece PACKAGE = Time::Piece |
13 | |
14 | PROTOTYPES: ENABLE |
15 | |
16 | char * |
d0369dd1 |
17 | __strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1) |
302d38aa |
18 | char * fmt |
19 | int sec |
20 | int min |
21 | int hour |
22 | int mday |
23 | int mon |
24 | int year |
25 | int wday |
26 | int yday |
27 | int isdst |
28 | CODE: |
29 | { |
30 | char *buf = my_strftime(fmt, sec, min, hour, mday, mon, year, wday, yday, isdst); |
2a74cb2d |
31 | if (buf) { |
32 | ST(0) = sv_2mortal(newSVpv(buf, 0)); |
33 | free(buf); |
34 | } |
302d38aa |
35 | } |