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

Some MSVC-fixes #3

Merged
5 commits merged into from
Sep 19, 2010
Merged

Some MSVC-fixes #3

5 commits merged into from
Sep 19, 2010

Conversation

maghoff
Copy link
Contributor

@maghoff maghoff commented Sep 17, 2010

Unfortunately, libjson does not compile with MS's C compiler :(

These commits fix some of the problems. Some of the changes, for example relating to signed vs unsigned, make sense independently of MSVC, I think.

With all these changes, it still won't work in MSVC, because it does not implement support for designated initializers for arrays :( This does not seem to be on the roadmap for MSVC either, unfortunately.

Even though it still won't work in MSVC, I find it valuable to deviate as little as possible from what works on the greatest amount of compilers. Pull what you feel like, and disregard the rest, no stress :)

If the actions_map could easily be initialized in an MSVC-friendly way, I would be very grateful. I'm a bit scared of that table myself, so I don't know quite where to start if I were to change it :) I've implemented initializing it at runtime as a test, and with that final change it works nicely in MSVC.

@vincenthz
Copy link
Owner

thanks you for the commits, I think that's useful to be able to compile under MSVC (although i would wish they would be more compliant with gcc ;)).

which part of the actions_map table MSVC is complaining about ? is it the function pointer or the array initilizer that it thinks is non-constant ?

@attekett attekett mentioned this pull request Sep 28, 2016
This pull request was closed.
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.

2 participants