[Python-Dev] More C API abstraction for user defined types (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Tue Jul 13 14:52:29 CEST 2010
- Previous message: [Python-Dev] More C API abstraction for user defined types
- Next message: [Python-Dev] More C API abstraction for user defined types
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Jul 13, 2010 at 6:44 PM, Mark Dickinson <dickinsm at gmail.com> wrote:
On Mon, Jul 12, 2010 at 10:19 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
On Tue, Jul 13, 2010 at 3:35 AM, Petre Galan <Petre.Galan at gmail.com> wrote:
ival should not be resolved through PyLongAsLong, but through functionality/interface like PyNumberLong +1, but I'd prefer it if PyNumberIndex were used, rather than PyNumberLong. It shouldn't be possible to pass a Decimal instance to something expecting an integer argument.
Oops, I misread the suggestion. Indeed, PyNumber_Index is the correct API function for this purpose.
Cheers, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message: [Python-Dev] More C API abstraction for user defined types
- Next message: [Python-Dev] More C API abstraction for user defined types
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]