Project

General

Profile

« Previous | Next » 

Revision 445e80ae

Added by Xavier Thirioux over 7 years ago

View differences:

src/backends/C/c_backend_main.ml
32 32

  
33 33
let print_get_inputs fmt m =
34 34
  let pi fmt (v', v) =
35
  match v.var_type.Types.tdesc with
35
  match (Types.repr v.var_type).Types.tdesc with
36 36
    | Types.Tint -> fprintf fmt "%s = _get_int(\"%s\")" v.var_id v'.var_id
37 37
    | Types.Tbool -> fprintf fmt "%s = _get_bool(\"%s\")" v.var_id v'.var_id
38 38
    | Types.Treal when !Options.mpfr -> fprintf fmt "mpfr_set_d(%s, _get_double(\"%s\"), %i)" v.var_id v'.var_id (Mpfr.mpfr_prec ())
......
50 50

  
51 51
let print_put_outputs fmt m = 
52 52
  let po fmt (o', o) =
53
    match o.var_type.Types.tdesc with
53
    match (Types.repr o.var_type).Types.tdesc with
54 54
    | Types.Tint -> fprintf fmt "_put_int(\"%s\", %s)" o'.var_id o.var_id
55 55
    | Types.Tbool -> fprintf fmt "_put_bool(\"%s\", %s)" o'.var_id o.var_id
56 56
    | Types.Treal when !Options.mpfr -> fprintf fmt "_put_double(\"%s\", mpfr_get_d(%s, %s))" o'.var_id o.var_id (Mpfr.mpfr_rnd ())

Also available in: Unified diff