diff options
author | Dan Gudmundsson <[email protected]> | 2015-12-03 14:42:09 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2015-12-03 16:21:50 +0100 |
commit | 80483dcb40c382e38405204370dfac7a8b6513aa (patch) | |
tree | 54958cf339de6e909434aa1f5e25552cb8b95eb1 /lib/wx/api_gen | |
parent | f0ab82279fa6fc7c91d9b3c193d1890b7c83e39b (diff) | |
download | otp-80483dcb40c382e38405204370dfac7a8b6513aa.tar.gz otp-80483dcb40c382e38405204370dfac7a8b6513aa.tar.bz2 otp-80483dcb40c382e38405204370dfac7a8b6513aa.zip |
wx: Fix some function specifications
Diffstat (limited to 'lib/wx/api_gen')
-rw-r--r-- | lib/wx/api_gen/gl_gen_erl.erl | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/wx/api_gen/gl_gen_erl.erl b/lib/wx/api_gen/gl_gen_erl.erl index 20406a8d05..84e9600bc0 100644 --- a/lib/wx/api_gen/gl_gen_erl.erl +++ b/lib/wx/api_gen/gl_gen_erl.erl @@ -226,10 +226,14 @@ gen_types(Where) -> w("-type clamp() :: float(). %% 0.0..1.0~n", []), w("-type offset() :: non_neg_integer(). %% Offset in memory block~n", []) end, - w("-type matrix() :: {float(),float(),float(),float(),~n", []), + w("-type matrix12() :: {float(),float(),float(),float(),~n", []), + w(" float(),float(),float(),float(),~n", []), + w(" float(),float(),float(),float()}.~n", []), + w("-type matrix16() :: {float(),float(),float(),float(),~n", []), w(" float(),float(),float(),float(),~n", []), w(" float(),float(),float(),float(),~n", []), w(" float(),float(),float(),float()}.~n", []), + w("-type matrix() :: matrix12() | matrix16().~n", []), w("-type mem() :: binary() | tuple(). %% Memory block~n", []), ok. @@ -480,10 +484,12 @@ doc_arg_type2(T=#type{single=true}) -> doc_arg_type3(T); doc_arg_type2(T=#type{single=undefined}) -> doc_arg_type3(T); -doc_arg_type2(T=#type{single={tuple,undefined}}) -> - "{" ++ doc_arg_type3(T) ++ "}"; +doc_arg_type2(_T=#type{single={tuple,undefined}}) -> + "tuple()"; doc_arg_type2(#type{base=float, single={tuple,16}}) -> "matrix()"; +doc_arg_type2(#type{base=string, single=list}) -> + "iolist()"; doc_arg_type2(T=#type{single={tuple,Sz}}) -> "{" ++ args(fun doc_arg_type3/1, ",", lists:duplicate(Sz,T)) ++ "}"; doc_arg_type2(T=#type{single=list}) -> |