diff options
author | Björn Gustavsson <[email protected]> | 2017-02-24 10:08:30 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-02-24 10:08:30 +0100 |
commit | 4f83fcd6ea5ff5bfa68f23cd34550b4705d17574 (patch) | |
tree | 147bda54fa7452482df05a66d9d9134e6a1ca20d | |
parent | a5638411f2d16f6648bb1c904206079df00d2471 (diff) | |
parent | c57a0b427c675c92d8d043dee48a3217b2e467ac (diff) | |
download | otp-4f83fcd6ea5ff5bfa68f23cd34550b4705d17574.tar.gz otp-4f83fcd6ea5ff5bfa68f23cd34550b4705d17574.tar.bz2 otp-4f83fcd6ea5ff5bfa68f23cd34550b4705d17574.zip |
Merge branch 'bjorn/stdlib/misc-fixes'
* bjorn/stdlib/misc-fixes:
c: Reintroduce support for non-list options in c/2
c: Remove unused import of lists:concat/1
-rw-r--r-- | lib/stdlib/src/c.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/stdlib/src/c.erl b/lib/stdlib/src/c.erl index d3f9a9c7af..52df2319dd 100644 --- a/lib/stdlib/src/c.erl +++ b/lib/stdlib/src/c.erl @@ -35,7 +35,7 @@ -export([appcall/4]). -import(lists, [reverse/1,flatten/1,sublist/3,sort/1,keysort/2, - concat/1,max/1,min/1,foreach/2,foldl/3,flatmap/2]). + max/1,min/1,foreach/2,foldl/3,flatmap/2]). -import(io, [format/1, format/2]). %%----------------------------------------------------------------------- @@ -83,9 +83,11 @@ c(Module) -> c(Module, []). -spec c(Module, Options) -> {'ok', ModuleName} | 'error' when Module :: file:name(), - Options :: [compile:option()], + Options :: [compile:option()] | compile:option(), ModuleName :: module(). +c(Module, SingleOption) when not is_list(SingleOption) -> + c(Module, [SingleOption]); c(Module, Opts) when is_atom(Module) -> %% either a module name or a source file name (possibly without %% suffix); if such a source file exists, it is used to compile from |