forked from K0lb3/UnityPy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTypeTreeHelper.hpp
More file actions
51 lines (47 loc) · 1 KB
/
Copy pathTypeTreeHelper.hpp
File metadata and controls
51 lines (47 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#define PY_SSIZE_T_CLEAN
#pragma once
#include <Python.h>
#include "structmember.h"
#include <vector>
enum NodeDataType
{
u8 = 0,
u16 = 1,
u32 = 2,
u64 = 3,
s8 = 4,
s16 = 5,
s32 = 6,
s64 = 7,
f32 = 8,
f64 = 9,
boolean = 10,
str = 11,
bytes = 12,
pair = 13,
array = 14,
pptr = 15,
unk = 255
};
typedef struct TypeTreeNodeObject
{
PyObject_HEAD
// helper field - simple hash of type for faster comparison
unsigned int _data_type;
bool _align;
// used filds for fast access
PyObject* m_Children;
PyObject *m_Name;
// fields not used in C
PyObject *m_Level;
PyObject *m_Type;
PyObject *m_ByteSize;
PyObject *m_Version;
PyObject *m_TypeFlags;
PyObject *m_VariableCount;
PyObject *m_Index;
PyObject *m_MetaFlag;
PyObject *m_RefTypeHash;
} TypeTreeNodeObject;
int add_typetreenode_to_module(PyObject *m);
PyObject *read_typetree(PyObject *self, PyObject *args, PyObject *kwargs);