MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / HandleUnionDeclCursor

Function HandleUnionDeclCursor

Scripts/DefinitionExtract.py:234–261  ·  view source on GitHub ↗
(Arch, Cursor, NameOverride = "")

Source from the content-addressed store, hash-verified

232 return Arch
233
234def HandleUnionDeclCursor(Arch, Cursor, NameOverride = ""):
235 # Append namespace
236 CursorName = ""
237
238 if (len(Cursor.spelling) == 0):
239 CursorName = NameOverride
240 else:
241 CursorName = Cursor.spelling
242
243 if (len(CursorName) != 0):
244 Arch.NamespaceScope.append(CursorName)
245 SetNamespace(Arch)
246
247 UnionType = Cursor.type
248 Union = UnionDefinition(
249 Name = CursorName,
250 Size = UnionType.get_size())
251 Arch.Unions[Union.Name] = Union
252
253 # Handle children
254 Arch.Unions[Union.Name] = HandleStructElements(Arch, Union, Cursor)
255
256 # Pop namespace off
257 if (len(CursorName) != 0):
258 Arch.NamespaceScope.pop()
259 SetNamespace(Arch)
260
261 return Arch
262
263def HandleVarDeclCursor(Arch, Cursor):
264 CursorName = Cursor.spelling

Callers 2

HandleTypeDefDeclFunction · 0.70
HandleCursorFunction · 0.70

Calls 5

appendMethod · 0.80
popMethod · 0.80
SetNamespaceFunction · 0.70
UnionDefinitionClass · 0.70
HandleStructElementsFunction · 0.70

Tested by

no test coverage detected