Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Int32 conversion on 32-bit #12

Open
bhys opened this issue Sep 26, 2014 · 0 comments
Open

Int32 conversion on 32-bit #12

bhys opened this issue Sep 26, 2014 · 0 comments

Comments

@bhys
Copy link

bhys commented Sep 26, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant