ocamlgraph icon indicating copy to clipboard operation
ocamlgraph copied to clipboard

Convert from int32 for large integer literals in bitv.ml

Open TyOverby opened this issue 3 years ago • 0 comments

When the ocaml compiler emits bytecode for 32-bit architectures, large interger literals will cause it to fail. 32-bit marshalling is most commonly used when compiling with the Js_of_ocaml backend.

This error message is what you'd see when attempting to use ocamlgraph in a JSOO project:

----line 1 of _none_ col 1
File "_none_", line 1:
Error: Generated bytecode library "graph.cma" cannot be used on a 32-bit platform

By using 32-bit integer literals, we avoid the issue by eschewing platform-native integers.

TyOverby avatar Jul 18 '22 13:07 TyOverby