Project

General

Profile

« Previous | Next » 

Revision aaa8e454

Added by LĂ©lio Brun 7 months ago

it works

View differences:

src/backends/C/c_backend_header.ml
24 24
module type MODIFIERS_HDR = sig
25 25
  module GhostProto: MODIFIERS_GHOST_PROTO
26 26
  val print_machine_decl_prefix: Format.formatter -> machine_t -> unit
27
  val pp_import_standard_spec: formatter -> unit -> unit
27
  val pp_import_arrow: formatter -> unit -> unit
28 28
end
29 29

  
30 30
module EmptyMod = struct
31 31
  module GhostProto = EmptyGhostProto
32 32
  let print_machine_decl_prefix = fun _ _ -> ()
33
  let pp_import_standard_spec _ _ = ()
33
  let pp_import_arrow fmt () =
34
    fprintf fmt "#include \"%s/arrow.h%s\""
35
      (Arrow.arrow_top_decl ()).top_decl_owner
36
      (if !Options.cpp then "pp" else "")
34 37
end
35 38

  
36 39
module Main = functor (Mod: MODIFIERS_HDR) -> struct
......
42 45
    fprintf fmt
43 46
      "#include <stdint.h>@,\
44 47
       %a\
45
       #include \"%s/arrow.h%s\"\
46 48
       %a"
47 49
      (if !Options.mpfr then
48 50
         pp_print_endcut "#include <mpfr.h>"
49 51
       else pp_print_nothing) ()
50
      (Arrow.arrow_top_decl ()).top_decl_owner
51
      (if !Options.cpp then "pp" else "")
52
      Mod.pp_import_standard_spec ()
52
      Mod.pp_import_arrow ()
53 53

  
54 54
  let rec print_static_val pp_var fmt v =
55 55
    match v.value_desc with

Also available in: Unified diff