(Arch, Cursor, NameOverride = "")
| 232 | return Arch |
| 233 | |
| 234 | def 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 | |
| 263 | def HandleVarDeclCursor(Arch, Cursor): |
| 264 | CursorName = Cursor.spelling |
no test coverage detected