-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ujson tabs -> spaces and plug some memory leaks #1309
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
Conversation
Cool, this looks good. I'm going to try to get this building with MSVC today so that things pass on Win32/Win64. Note: MSVC is very strict about C variable declarations (have to be the first thing to appear in functions). gcc is more loosey-goosey. |
Ah I wasn't aware of that thanks, my main experience is with C++ and gcc. |
There's also stupid crap like this: http://stackoverflow.com/questions/7303740/error-c2057-expected-constant-expression |
How important is the npymath dependency? I think it only affects halffloat? I am having an absolutely wretched time trying to get it to link on Windows 32-bit (works in win64) |
Half float is probably not that important but off the top of my head I think the nan and infinity checking functions are from npymath too. http://docs.scipy.org/doc/numpy/reference/c-api.coremath.html There might be alternatives I'm not aware of though? |
I think the issue is that the official NumPy installers are built with mingw32 and not the VS2008 compiler (FML). As such the npymath.lib file is incompatible. Going to build NumPy 1.6.2 from source. I don't think I've ever hated Microsoft so much |
Building NumPy from source with VS2008 did the trick. Fun times |
Nice one. They do have a reputation to uphold after all:
On a brighter note I read today that Python is finally moving towards a new VS version http://blog.python.org/2012/05/recent-windows-changes-in-python-33.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+PythonInsider+%28Python+Insider%29 I've always built any extensions using minggw on my Windows VM but in future I might test my builds on msvc aswell, save others the pain ;) |
The ujson source code was tab-intended, this commit converts the ugly tabs to (four) spaces.
Also fixed some memory leaks and some compiler warnings.
All tests pass, tested on 64 bit OSX and 32 bit Ubuntu with Python 2.7.