mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
generator/daemon: Don't truncate 64 bit results from OCaml functions
Commitd5b6f1df5f("daemon: Allow parts of the daemon and APIs to be written in OCaml.", 2017) contained a bug where in any OCaml function that returns int64_t, the result was truncated to an int. This particularly affected part_get_gpt_attributes as that returns large 64 bit numbers, but probably affects other functions too, undetected. Fixes: commitd5b6f1df5f(cherry picked from commit882ef4d93a)
This commit is contained in:
@@ -835,7 +835,7 @@ let generate_daemon_caml_stubs () =
|
||||
| RInt _ ->
|
||||
pr " CAMLreturnT (int, Int_val (retv));\n"
|
||||
| RInt64 _ ->
|
||||
pr " CAMLreturnT (int, Int64_val (retv));\n"
|
||||
pr " CAMLreturnT (int64_t, Int64_val (retv));\n"
|
||||
| RBool _ ->
|
||||
pr " CAMLreturnT (int, Bool_val (retv));\n"
|
||||
| RConstString _ -> assert false
|
||||
|
||||
Reference in New Issue
Block a user