Skip to content

Int32 conversion on 32-bit #12

@bhys

Description

@bhys

using 32-bit Python 3.4.1, library built for x86, running on a 64-bit Windows machine
Any function expecting Int32 seems to fail
Functions expecting Int64 are ok

So calling DateTime(Int32, Int32, Int32) throws:
TypeError: no constructor matches given arguments

import clr
from System import DateTime
d2 = DateTime(2000,1,1)

while calling DateTime(Int64) is ok:

d1 = DateTime(600000000000000000)
print(d1)
30/04/1902 10:40:00

Both functions work fine if I comment out lines 412-415 in Python.Runtime/converter.cs:

                // As of Python 2.3, large ints magically convert :(
                //if (Runtime.PyLong_Check(op) ) {
                //    Runtime.Decref(op);
                //    goto overflow;
                //}

But I'm not sure if there are any side effects

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions