-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always binary when reading marshalled AST
+ Document assumptions in [with_output] using binary mode. + Remove unneeded changes in print_magic_number.ml. Signed-off-by: Jonah Beckford <[email protected]>
- Loading branch information
1 parent
cd8d6f6
commit b0e2367
Showing
2 changed files
with
14 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 1 addition & 5 deletions
6
test/driver/run_as_ppx_rewriter_preserve_version/print_magic_number.ml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
let magic_length = String.length Astlib.Config.ast_impl_magic_number | ||
let buf = Bytes.create magic_length | ||
|
||
let len = | ||
set_binary_mode_in stdin true; | ||
input stdin buf 0 magic_length | ||
|
||
let len = input stdin buf 0 magic_length | ||
let s = Bytes.sub_string buf 0 len | ||
let () = Printf.printf "Magic number: %s" s |