This repository was archived by the owner on Feb 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPy.h
More file actions
81 lines (61 loc) · 1.83 KB
/
Copy pathPy.h
File metadata and controls
81 lines (61 loc) · 1.83 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#pragma once
#include <windows.h>
#include <optional>
#include <string>
#include "PyTypes.h"
namespace Py {
typedef void (*REFProc)(void* obj);
extern REFProc IncRef;
extern REFProc DecRef;
namespace String {
typedef void* (*FromStringProc)(const char* str);
typedef char* (*AsStringProc)(void* str);
extern FromStringProc FromString;
extern AsStringProc AsString;
}
namespace Import {
typedef void* (*ImportProc)(void* name);
extern ImportProc Import;
}
namespace Object {
typedef void* (*GetAttrStringProc)(void* obj, const char* name);
typedef void* (*CallObjectProc)(void* obj, void* args);
typedef void* (*TypeProc)(void* obj);
typedef int (*IsInstanceProc)(void* obj, void* type);
typedef int (*TypeCheckProc)(void* obj, void* type);
typedef void* (*StrProc)(void* obj);
extern GetAttrStringProc GetAttrString;
extern CallObjectProc CallObject;
extern TypeProc Type;
extern IsInstanceProc IsInstance;
extern TypeCheckProc TypeCheck;
extern StrProc Str;
}
namespace GIL {
typedef GILState (*EnsureProc)();
typedef void (*ReleaseProc)(GILState state);
extern EnsureProc Ensure;
extern ReleaseProc Release;
}
namespace Tuple {
typedef void* (*NewProc)(int len);
typedef int (*SetItemProc)(void* tuple, int pos, void* obj);
extern NewProc New;
extern SetItemProc SetItem;
}
namespace Dict {
typedef int (*CheckProc)(void* obj);
typedef void* (*GetItemStringProc)(void* dict, const char* key);
typedef void* (*NewProc)();
extern CheckProc Check;
extern GetItemStringProc GetItemString;
extern NewProc New;
}
namespace List {
typedef int (*SizeProc)(void* list);
typedef void* (*GetItemProc)(void* list, int index);
extern SizeProc Size;
extern GetItemProc GetItem;
}
bool init();
}