aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/api_gen/gl_gen.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2012-03-21 10:23:37 +0100
committerDan Gudmundsson <[email protected]>2012-03-21 10:23:37 +0100
commitd11efce543903a6adf6180f80ebf7ae854f5b6f1 (patch)
treef830bd41c6ec4cc1d1253f4aedfcaef446bbf516 /lib/wx/api_gen/gl_gen.erl
parent17aca0a257880761aa3e86da7ffa906269ed947c (diff)
parent8d5372dcb2aaed98063d9a9c74a052612ecfa3ca (diff)
downloadotp-d11efce543903a6adf6180f80ebf7ae854f5b6f1.tar.gz
otp-d11efce543903a6adf6180f80ebf7ae854f5b6f1.tar.bz2
otp-d11efce543903a6adf6180f80ebf7ae854f5b6f1.zip
Merge branch 'dgud/wx/misc-improvements/OTP-9947' into maint
* dgud/wx/misc-improvements/OTP-9947: [wx] Add more types [wx] Fix listctrl issues [wx] Fix bad defines [wx] Fix bad type references [wx] Fix missing export_types
Diffstat (limited to 'lib/wx/api_gen/gl_gen.erl')
-rw-r--r--lib/wx/api_gen/gl_gen.erl11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/wx/api_gen/gl_gen.erl b/lib/wx/api_gen/gl_gen.erl
index ce0cb922e9..331ba32ba4 100644
--- a/lib/wx/api_gen/gl_gen.erl
+++ b/lib/wx/api_gen/gl_gen.erl
@@ -190,14 +190,17 @@ parse_define([#xmlElement{name=initializer,content=[#xmlText{value=V}]}|_],Def,_
try
case Val0 of
"0x" ++ Val1 ->
- Val = http_util:hexlist_to_integer(Val1),
- Def#def{val=Val, type=hex};
+ _ = http_util:hexlist_to_integer(Val1),
+ Def#def{val=Val1, type=hex};
_ ->
Val = list_to_integer(Val0),
Def#def{val=Val, type=int}
end
- catch _:_ ->
- Def#def{val=Val0, type=string}
+ catch _:_ ->
+ case catch list_to_float(Val0) of
+ {'EXIT', _} -> Def#def{val=Val0, type=string};
+ _ -> Def#def{val=Val0, type=float_str}
+ end
end;
parse_define([_|R], D, Opts) ->
parse_define(R, D, Opts);