Skip to content

Commit

Permalink
Fix {c,cxx}_name
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg committed Jan 31, 2019
1 parent b923404 commit ecd29be
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/c_sources.ml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,16 @@ let empty =
}

let c_name, cxx_name =
let make what ext ~loc s =
let make what ~loc s =
if match s with
| "" | "." | ".." -> true
| _ -> false then
Errors.fail loc
"%S is not a valid %s name."
s what what ext
Errors.fail loc "%S is not a valid %s name." s what
else
s
in
( make "C" "c"
, make "C++" "cpp"
( make "C"
, make "C++"
)

module Eval = struct
Expand Down

0 comments on commit ecd29be

Please sign in to comment.