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.compare uses polymorphic compare_val #5244

Closed
vicuna opened this issue Mar 29, 2011 · 3 comments
Closed

String.compare uses polymorphic compare_val #5244

vicuna opened this issue Mar 29, 2011 · 3 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Mar 29, 2011

Original bug ID: 5244
Reporter: @ygrek
Status: closed (set by @damiendoligez on 2011-05-16T14:46:32Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.12.0
Fixed in version: 3.12.1+dev
Category: ~DO NOT USE (was: OCaml general)
Child of: #4194
Monitored by: mehdi "Pascal Cuoq" "Christoph Bauer"

Bug description

let func1 x y = compare x y
let func2 x y = String.compare x y
let func3 (x:string) y = compare x y
let func4 (x:string) y = String.compare x y

Only func3 calls caml_string_compare directly, others invoke caml_compare via caml_c_call. Verified with ocamlopt -c -S str.ml. Probably this is caused by let compare = Pervasives.compare in stdlib/string.ml

@vicuna
Copy link
Author

vicuna commented Mar 30, 2011

Comment author: @oandrieu

I had reported this some time ago (issue #4194) and it was definitely in 3.10.
I looks like it has been reverted at some point ..

@vicuna
Copy link
Author

vicuna commented Mar 30, 2011

Comment author: @ygrek

looks like stdlib/string.ml was wrongly merged in r8189

@vicuna
Copy link
Author

vicuna commented May 16, 2011

Comment author: @damiendoligez

fixed it by re-doing commit 7818

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

No branches or pull requests

1 participant