Message75899
I like the method, but I have some comments about the new method:
- datetime_totimestamp() is not well indented
- "PyObject *time" should be defined at the before the first
instruction
- why not using "if (time == NULL) return NULL;" directly instead of
using a block in case of time is not NULL?
- there are reference leaks: timetuple, timestamp and
PyFloat_FromDouble()
I wrote a similar patch before reading
add-datetime-totimestamp-method.diff which does exactly the same... I
attach my patch but both should be merged. |
|
Date |
User |
Action |
Args |
2008-11-15 00:33:13 | vstinner | set | recipients:
+ vstinner, tebeka, davidfraser, werneck, hodgestar, Neil Muller |
2008-11-15 00:33:12 | vstinner | set | messageid: <1226709192.97.0.629434977999.issue2736@psf.upfronthosting.co.za> |
2008-11-15 00:33:12 | vstinner | link | issue2736 messages |
2008-11-15 00:33:12 | vstinner | create | |
|