Creating a datetime object from a C Extention
Gerhard Schmidt
estartu at augusta.de
Mon Nov 30 03:41:15 EST 2009
HI,
I'm writing a python C Extension and need to create datetime objects but
when I call
value = PyDateTime_FromDateAndTime(ti->tm_year+1900, ti->tm_mon,
ti->tm_mday, ti->tm_hour, ti->tm_min, ti->tm_sec, u);
I get an SegFault.
ti = {tm_sec = 25, tm_min = 37, tm_hour = 8, tm_mday = 30, tm_mon = 10,
tm_year = 109, tm_wday = 1, tm_yday = 333, tm_isdst = 0,
tm_gmtoff = 0, tm_zone = 0x800fd20c8 "UTC"}
u = 0
Is there an Dokumentation or example code HowTo create a datetime object
from a C Extension.
Regards
Estartu
--
----------------------------------------------------------------------------
Gerhard Schmidt | http://www.augusta.de/~estartu/ |
Fischbachweg 3 | | PGP Public Key
86856 Hiltenfingen | JabberID: estartu at augusta.de | auf Anfrage/
Tel: 08232 77 36 4 | IRCNET: Estartu | on request
Fax: 08232 77 36 3 | |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 369 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20091130/a08cdddd/attachment.sig>
More information about the Python-list
mailing list