mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
generator: copywrites -> copyrights
This commit is contained in:
@@ -984,8 +984,8 @@ and generate_php_bindtests () =
|
||||
dump "bindtests"
|
||||
|
||||
and generate_rust_bindtests () =
|
||||
let copywrites = ["Hiroyuki Katsura <hiroyuki.katsura.0513@gmail.com>"] in
|
||||
generate_header ~copywrites:copywrites CStyle GPLv2plus;
|
||||
let copyrights = ["Hiroyuki Katsura <hiroyuki.katsura.0513@gmail.com>"] in
|
||||
generate_header ~copyrights:copyrights CStyle GPLv2plus;
|
||||
|
||||
pr "extern crate guestfs;\n";
|
||||
pr "use guestfs::*;\n";
|
||||
|
||||
@@ -76,7 +76,7 @@ type comment_style =
|
||||
| ErlangStyle | LuaStyle | PODStyle
|
||||
type license = GPLv2plus | LGPLv2plus
|
||||
|
||||
let generate_header ?(copywrites = ["Red Hat Inc."]) ?(inputs = []) ?emacs_mode comment license =
|
||||
let generate_header ?(copyrights = ["Red Hat Inc."]) ?(inputs = []) ?emacs_mode comment license =
|
||||
let c = match comment with
|
||||
| CStyle -> pr "/* "; " *"
|
||||
| CPlusPlusStyle -> pr "// "; "//"
|
||||
@@ -104,7 +104,7 @@ let generate_header ?(copywrites = ["Red Hat Inc."]) ?(inputs = []) ?emacs_mode
|
||||
pr "%s\n" c;
|
||||
List.iter (fun x ->
|
||||
pr "%s Copyright (C) %s %s\n" c copyright_years x;
|
||||
) copywrites;
|
||||
) copyrights;
|
||||
pr "%s\n" c;
|
||||
(match license with
|
||||
| GPLv2plus ->
|
||||
|
||||
@@ -31,4 +31,4 @@ val version_added : Types.action -> string option
|
||||
|
||||
val copyright_years : string
|
||||
|
||||
val generate_header : ?copywrites:string list -> ?inputs:string list -> ?emacs_mode:string -> comment_style -> license -> unit
|
||||
val generate_header : ?copyrights:string list -> ?inputs:string list -> ?emacs_mode:string -> comment_style -> license -> unit
|
||||
|
||||
@@ -29,7 +29,7 @@ open Structs
|
||||
open C
|
||||
open Events
|
||||
|
||||
let copywrites = ["Hiroyuki Katsura <hiroyuki.katsura.0513@gmail.com>"]
|
||||
let copyrights = ["Hiroyuki Katsura <hiroyuki.katsura.0513@gmail.com>"]
|
||||
|
||||
(* Utilities for Rust *)
|
||||
(* Are there corresponding functions to them? *)
|
||||
@@ -53,7 +53,7 @@ let translate_bad_symbols s =
|
||||
s
|
||||
|
||||
let generate_rust () =
|
||||
generate_header ~copywrites:copywrites CStyle LGPLv2plus;
|
||||
generate_header ~copyrights:copyrights CStyle LGPLv2plus;
|
||||
|
||||
pr "
|
||||
use crate::base::*;
|
||||
|
||||
Reference in New Issue
Block a user