2013/9/7 Armin Rigo <ar...@tunes.org>

> It seems that "struct PyDateTime_Delta" is supposed to be purely
> read-only.  In case situation, wouldn't it make sense to expose a
> structure with a similar layout?  I don't think we care about the
> overhead of copying three words; the only annoying case is about
> read-write objects, when we want the changes in C to be reflected back
> to the Python world.
>

This is right.
But datetime classes are difficult to handle in cpyext, because they are
pure-python classes. They don't have a specific "TypeDef", and cpyext ties
the C structs to those typedefs.
See sliceobject.py for a simple example of filling the C struct; I don't
know how to do this for datetime.

-- 
Amaury Forgeot d'Arc
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to