From 04bce7acad25e8b3184f8e6de7cca20a773401f4 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 22 Feb 2011 00:07:19 +0000 Subject: [PATCH] Simplify parsing of CEF structure types. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@190 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- tools/cef_parser.py | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/tools/cef_parser.py b/tools/cef_parser.py index 11d91a715..18f3a7e96 100644 --- a/tools/cef_parser.py +++ b/tools/cef_parser.py @@ -1053,21 +1053,6 @@ class obj_analysis: 'result_value' : None } - # check for simple direct translations - structuretypes = { - 'CefPrintInfo' : 'cef_print_info_t', - 'CefWindowInfo' : 'cef_window_info_t', - 'CefPopupFeatures' : 'cef_popup_features_t', - 'CefSettings' : 'cef_settings_t', - 'CefBrowserSettings' : 'cef_browser_settings_t', - 'CefURLParts' : 'cef_urlparts_t', - } - if value in structuretypes.keys(): - return { - 'result_type' : 'structure', - 'result_value' : structuretypes[value] - } - # check for simple direct translations simpletypes = { 'void' : 'void', @@ -1105,6 +1090,13 @@ class obj_analysis: 'result_type' : 'refptr', 'result_value' : get_capi_name(list[0], True)+'*' } + + # check for CEF structure types + if value[0:3] == 'Cef' and value[-4:] != 'List': + return { + 'result_type' : 'structure', + 'result_value' : get_capi_name(value, True) + } return None