generator: Use quoted string literals for regexps

The output of the generator is identical after this change.
This commit is contained in:
Richard W.M. Jones
2025-09-02 09:09:02 +01:00
parent 02b64d5cec
commit e7b36e0eba
2 changed files with 7 additions and 7 deletions

View File

@@ -909,12 +909,12 @@ guestfs_session_close (GuestfsSession *session, GError **err)
return TRUE;
}|};
let urls = Str.regexp "L<\\(https?\\)://\\([^>]*\\)>" in
let bz = Str.regexp "RHBZ#\\([0-9]+\\)" in
let cve = Str.regexp "\\(\\s\\)\\(CVE-[0-9]+-[0-9]+\\)" in
let api_crossref = Str.regexp "C<guestfs_\\([-_0-9a-zA-Z]+\\)>" in
let nonapi_crossref = Str.regexp "C<\\([-_0-9a-zA-Z]+\\)>" in
let escaped = Str.regexp "E<\\([0-9a-zA-Z]+\\)>" in
let urls = Str.regexp {|L<\(https?\)://\([^>]*\)>|} in
let bz = Str.regexp {|RHBZ#\([0-9]+\)|} in
let cve = Str.regexp {|\(\s\)\(CVE-[0-9]+-[0-9]+\)|} in
let api_crossref = Str.regexp {|C<guestfs_\([-_0-9a-zA-Z]+\)>|} in
let nonapi_crossref = Str.regexp {|C<\([-_0-9a-zA-Z]+\)>|} in
let escaped = Str.regexp {|E<\([0-9a-zA-Z]+\)>|} in
let literal = Str.regexp "\\(^\\|\n\\)[ \t]+\\([^\n]*\\)\\(\n\\|$\\)" in
List.iter (

View File

@@ -892,7 +892,7 @@ do_completion (const char *text, int start, int end)
and generate_fish_actions_pod () =
generate_header PODStyle GPLv2plus;
let rex = Str.regexp "C<guestfs_\\([^>]+\\)>" in
let rex = Str.regexp {|C<guestfs_\([^>]+\)>|} in
List.iter (
fun ({ name; style = _, args, optargs; longdesc } as f) ->