Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: Fix string to uint64 conversion on 32-bit platforms #4712

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

Merged
merged 1 commit into from
May 15, 2014

Conversation

juliantaylor
Copy link
Contributor

closes gh-4575

@juliantaylor
Copy link
Contributor Author

we should probably warn on overflow here, but ENOTIME currently
I guess, datetime fromstring could use time parsing instead of reading only integers but that needs defining what type of formatting we accept here.

#if defined HAVE_STRTOLL
return strtoll(str, endptr, base);
#elif defined _MSC_VER
return _strtoi64(str, endptr, base);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This returns __int64, which is more specific than long long. Any reason that strtoll won't be available for MSC? It is in at least VS2013.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm hoping int64 and long long is the same in VC
if it has strtoll it will use it even with VC (assuming setup.py detects it)

@charris
Copy link
Member

charris commented May 15, 2014

LGTM, thanks Julian.

charris added a commit that referenced this pull request May 15, 2014
BUG: Fix string to uint64 conversion on 32-bit platforms
@charris charris merged commit 677ff90 into numpy:master May 15, 2014
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

Successfully merging this pull request may close these issues.

numpy.fromstring unable to parse values > 2^32 on 32 bit arch
2 participants