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

String_val returns const char* #4137

Merged
merged 1 commit into from
Jun 3, 2020
Merged

Conversation

MisterDA
Copy link
Contributor

@MisterDA MisterDA commented Apr 9, 2020

No description provided.

@rjbou
Copy link
Collaborator

rjbou commented Apr 9, 2020

ping @dra27

@MisterDA
Copy link
Contributor Author

This is required in order to build Opam with OCaml 4.10. I think that discarding the const qualifier is a warning by default, but it’s been turned into an error when compiling Opam.

@rjbou rjbou requested a review from dra27 May 6, 2020 20:24
@MisterDA
Copy link
Contributor Author

The errors this PR fixes are:

Command [288] exited with code 2:
$ (cd _build/default/src/stubs && C:\cygwin64\opt\OCamlPlatform\bin\ocamlc.opt.exe -g -ccopt -nologo -ccopt -O2 -ccopt -Gy- -ccopt -MD -ccopt /WX -o opamWindows.obj opamWindows.c)
opamWindows.c(386): error C2220: the following warning is treated as an error
opamWindows.c(386): warning C4090: '=': different 'const' qualifiers
opamWindows.c(572): warning C4090: 'function': different 'const' qualifiers
opamWindows.c(573): warning C4090: 'function': different 'const' qualifiers
opamWindows.c(741): warning C4090: 'function': different 'const' qualifiers
opamWindows.c(741): warning C4090: 'function': different 'const' qualifiers

Copy link
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

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

Sorry for the delay reviewing. There's a load of legacy #ifdef _WIN32 which are unnecessary (and incorrect) and these stubs should be upgraded to support Unicode properly, but the changes here are completely correct, thanks!

@AltGr AltGr merged commit 1de84a1 into ocaml:master Jun 3, 2020
@rjbou rjbou added this to the 2.1.0~alpha2 milestone Jun 3, 2020
@rjbou rjbou added this to PR in Progress in Opam 2.1.x via automation Jun 3, 2020
@rjbou rjbou moved this from PR in Progress to Done in Opam 2.1.x Jun 3, 2020
@MisterDA MisterDA deleted the string_val_const branch June 3, 2020 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Opam 2.1.x
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants