Skip to content

Commit

Permalink
Merge pull request #412 from yallop/sint-printer
Browse files Browse the repository at this point in the history
Add a top-level printer for the new 'sint' type.
  • Loading branch information
yallop authored Jun 28, 2016
2 parents 15109de + c7f7d63 commit 82ac376
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ctypes-top/ctypes_printers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

let format_typ fmt t = Ctypes.format_typ fmt t
let format_fn fmt fn = Ctypes.format_fn fmt fn
let format_sint fmt v =
Format.fprintf fmt "<sint %s>" (Signed.SInt.to_string v)
let format_long fmt v =
Format.fprintf fmt "<long %s>" (Signed.Long.to_string v)
let format_llong fmt v =
Expand Down
1 change: 1 addition & 0 deletions src/ctypes-top/ctypes_printers.mli
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ open Format

val format_typ : formatter -> 'a Ctypes.typ -> unit
val format_fn : formatter -> 'a Ctypes.fn -> unit
val format_sint : formatter -> Signed.SInt.t -> unit
val format_long : formatter -> Signed.Long.t -> unit
val format_llong : formatter -> Signed.LLong.t -> unit
val format_uchar : formatter -> Unsigned.UChar.t -> unit
Expand Down
1 change: 1 addition & 0 deletions src/ctypes-top/install_ctypes_printers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

let printers = [ "Ctypes_printers.format_typ";
"Ctypes_printers.format_fn";
"Ctypes_printers.format_sint";
"Ctypes_printers.format_long";
"Ctypes_printers.format_llong";
"Ctypes_printers.format_uchar";
Expand Down

0 comments on commit 82ac376

Please sign in to comment.