Kakadu / lablqml

Interfacing Qt/QML with OCaml. Formely known as lablqt
http://kakadu.github.io/lablqml
GNU Lesser General Public License v2.1
159 stars 17 forks source link

fix: add OCaml 5 support #67

Open darlentar opened 1 year ago

darlentar commented 1 year ago

Before OCaml5, hash_variant was defined as an alias for caml_hash_variant in compatibility.h file (#define hash_variant caml_hash_variant)

Seems not present in OCaml5 so this patch rename hash_variant to caml_hash_variant.

darlentar commented 1 year ago

Needs other changes though as some functions also changed in generated code ( eg register_global_root->caml_register_global_root).

Also need to fix domain lock issues introduced with OCaml5. When we compile helloworld example we have:

➜  helloworld git:(add_ocaml5_support) ✗ ./helloworld
Fatal error: no domain lock held
Kakadu commented 1 year ago

It looks like some additional checks has been added in https://github.com/ocaml/ocaml/pull/11506 Don't know how write correctly yet....