Introduce CefString and cef_string_t implementations that support string type conversions and customization of the API string type (issue #146).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@145 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2010-11-22 17:49:46 +00:00
parent 1e1c2ad8d7
commit 7d60642638
121 changed files with 2598 additions and 3209 deletions

View File

@ -1047,7 +1047,7 @@ class obj_analysis:
def _get_basic(self, value):
# check for string values
if value == "std::wstring":
if value == "CefString":
return {
'result_type' : 'string',
'result_value' : None
@ -1192,13 +1192,16 @@ class obj_analysis:
def get_result_string_type(self):
""" Return the string type. """
# if the string is a return value, or if the string is passed by
# reference or address then use the read-write string type
if not self.has_name():
return 'cef_string_t'
# Return values are string structs that the user must free. Use
# the name of the structure as a hint.
return 'cef_string_userfree_t'
elif not self.is_const() and (self.is_byref() or self.is_byaddr()):
# Parameters passed by reference or address. Use the normal
# non-const string struct.
return 'cef_string_t*'
return 'const wchar_t*'
# Const parameters use the const string struct.
return 'const cef_string_t*'
def is_result_vector(self):
""" Returns true if this is a vector type. """