Project

General

Profile

Revision 13aec2da src/backends/C/c_backend_header.ml

View differences:

src/backends/C/c_backend_header.ml
281 281
      (pp_c_type cdecl.const_id) cdecl.const_type
282 282

  
283 283
let rec pp_c_struct_type_field filename cpt fmt (label, tdesc) =
284
  fprintf fmt "%a;" (pp_c_type_decl filename cpt label) tdesc
284
   fprintf fmt "%a;" (pp_c_type_decl filename cpt label) tdesc
285 285
and pp_c_type_decl filename cpt var fmt tdecl =
286 286
  match tdecl with
287 287
  | Tydec_any           -> assert false
......
297 297
  | Tydec_enum tl ->
298 298
    begin
299 299
      incr cpt;
300
      fprintf fmt "enum _enum_%s_%d { %a } %s" filename !cpt (Utils.fprintf_list ~sep:", " pp_print_string) tl var
300
      fprintf fmt "enum _enum_%s_%d { %a } %s" (protect_filename filename) !cpt (Utils.fprintf_list ~sep:", " pp_print_string) tl var
301 301
    end
302 302
  | Tydec_struct fl ->
303 303
    begin
304 304
      incr cpt;
305
      fprintf fmt "struct _struct_%s_%d { %a } %s" filename !cpt (Utils.fprintf_list ~sep:" " (pp_c_struct_type_field filename cpt)) fl var
305
      fprintf fmt "struct _struct_%s_%d { %a } %s" (protect_filename filename) !cpt (Utils.fprintf_list ~sep:" " (pp_c_struct_type_field filename cpt)) fl var
306 306
    end
307 307

  
308 308
let print_type_definitions fmt filename =

Also available in: Unified diff