code-intelligence 3.0.1__py3-none-win_amd64.whl → 3.2.0__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- code_intelligence/__init__.py +8 -1
- code_intelligence/goober.py +14 -7
- code_intelligence/libcode_intelligence.h +1 -0
- code_intelligence/libcode_intelligence.so +0 -0
- {code_intelligence-3.0.1.dist-info → code_intelligence-3.2.0.dist-info}/METADATA +1 -1
- code_intelligence-3.2.0.dist-info/RECORD +8 -0
- code_intelligence-3.0.1.dist-info/RECORD +0 -8
- {code_intelligence-3.0.1.dist-info → code_intelligence-3.2.0.dist-info}/WHEEL +0 -0
code_intelligence/__init__.py
CHANGED
|
@@ -4,9 +4,15 @@ from .goober import (
|
|
|
4
4
|
scan_file,
|
|
5
5
|
find_symbols_in_text,
|
|
6
6
|
stop,
|
|
7
|
+
clear,
|
|
7
8
|
)
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
# PROUD - Bump when you are proud of the release.
|
|
11
|
+
# DEFAULT - Just normal/okay releases.
|
|
12
|
+
# SHAME - Bump when fixing things too embarrassing to admit.
|
|
13
|
+
# PROUD.DEFAULT.SHAME
|
|
14
|
+
# \ | /
|
|
15
|
+
__version__ = "3.2.0"
|
|
10
16
|
__version_info__ = tuple(int(i) for i in __version__.split('.'))
|
|
11
17
|
|
|
12
18
|
__all__ = [
|
|
@@ -15,4 +21,5 @@ __all__ = [
|
|
|
15
21
|
"scan_file",
|
|
16
22
|
"find_symbols_in_text",
|
|
17
23
|
"stop",
|
|
24
|
+
"clear",
|
|
18
25
|
]
|
code_intelligence/goober.py
CHANGED
|
@@ -24,11 +24,11 @@ _lib.enqueue_scan_file.restype = None
|
|
|
24
24
|
|
|
25
25
|
class Definition_Link_C(C.Structure):
|
|
26
26
|
_fields_ = [
|
|
27
|
-
("
|
|
28
|
-
("
|
|
29
|
-
("source_file"
|
|
30
|
-
("line_0_based"
|
|
31
|
-
("column_0_based"
|
|
27
|
+
("start_offset_in_utf8_text", C.c_uint32),
|
|
28
|
+
("end_offset_in_utf8_text" , C.c_uint32),
|
|
29
|
+
("source_file" , C.c_char_p),
|
|
30
|
+
("line_0_based" , C.c_uint32),
|
|
31
|
+
("column_0_based" , C.c_uint32),
|
|
32
32
|
]
|
|
33
33
|
|
|
34
34
|
FIND_CALLBACK = C.CFUNCTYPE(None, C.c_void_p, C.POINTER(Definition_Link_C), C.c_int, C.c_void_p)
|
|
@@ -38,6 +38,9 @@ _lib.enqueue_find_symbols_in_text.restype = None
|
|
|
38
38
|
_lib.enqueue_stop.argtypes = []
|
|
39
39
|
_lib.enqueue_stop.restype = None
|
|
40
40
|
|
|
41
|
+
_lib.enqueue_clear.argtypes = []
|
|
42
|
+
_lib.enqueue_clear.restype = None
|
|
43
|
+
|
|
41
44
|
_lib.get_pending_tasks_count.argtypes = []
|
|
42
45
|
_lib.get_pending_tasks_count.restype = C.c_uint64
|
|
43
46
|
|
|
@@ -137,8 +140,8 @@ def C_AFTER_FIND(data_ptr, links_ptr, count, strings_handle):
|
|
|
137
140
|
for i in range(count):
|
|
138
141
|
link = links_ptr[i]
|
|
139
142
|
results[i] = Definition_Link(
|
|
140
|
-
start_offset_in_text=link.
|
|
141
|
-
end_offset_in_text=link.
|
|
143
|
+
start_offset_in_text=link.start_offset_in_utf8_text,
|
|
144
|
+
end_offset_in_text=link.end_offset_in_utf8_text,
|
|
142
145
|
source_file=link.source_file.decode('utf-8'),
|
|
143
146
|
line_0_based=link.line_0_based,
|
|
144
147
|
column_0_based=link.column_0_based,
|
|
@@ -157,6 +160,10 @@ def stop():
|
|
|
157
160
|
_lib.enqueue_stop()
|
|
158
161
|
|
|
159
162
|
|
|
163
|
+
def clear():
|
|
164
|
+
_lib.enqueue_clear()
|
|
165
|
+
|
|
166
|
+
|
|
160
167
|
def wait_for_callbacks_in_seconds(timeout_s, step_s=0.15):
|
|
161
168
|
# print(f"[PY] Waiting for callbacks (~{timeout_s}s)...")
|
|
162
169
|
deadline = time.time() + timeout_s
|
|
@@ -111,6 +111,7 @@ extern "C" {
|
|
|
111
111
|
extern __declspec(dllexport) void enqueue_scan_file(scan_callback_t callback, uintptr_t data, char* c_path, GoUint64 language);
|
|
112
112
|
extern __declspec(dllexport) void enqueue_find_symbols_in_text(find_callback_t callback, uintptr_t data, char* c_text);
|
|
113
113
|
extern __declspec(dllexport) void enqueue_stop(void);
|
|
114
|
+
extern __declspec(dllexport) void enqueue_clear(void);
|
|
114
115
|
extern __declspec(dllexport) GoUint64 get_pending_tasks_count(void);
|
|
115
116
|
extern __declspec(dllexport) void free_memory(void* ptr);
|
|
116
117
|
|
|
Binary file
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
code_intelligence-3.2.0.dist-info/METADATA,sha256=V1bD7fBzmNxapeMHm7mj6uXPfKdeZkUut0CMoFw08K4,100
|
|
2
|
+
code_intelligence-3.2.0.dist-info/RECORD,,
|
|
3
|
+
code_intelligence-3.2.0.dist-info/WHEEL,sha256=aD7J6E7Slys9i0J65v6Ehfi0DHYa5rImRhUDp62Iwh0,98
|
|
4
|
+
code_intelligence/__init__.py,sha256=GeMGefLs44gKys7KF9QBqaUKip-vahzACFkgAQ1WO50,563
|
|
5
|
+
code_intelligence/goober.py,sha256=oKCO03I8_f68xf8E068dL5WCl7JeFhnlS_NrRVyzSA0,6367
|
|
6
|
+
code_intelligence/libcode_intelligence.h,sha256=GE8YrqsyrBQbWRIb0FfiWPRCG5W6c5HcZ3sjIOlp2bU,3114
|
|
7
|
+
code_intelligence/libcode_intelligence.so,sha256=eyZbp26Dt45Zoj-Kzgr9lsoylOzZzVqZI4xu0ht2bLM,2839552
|
|
8
|
+
code_intelligence/symdb.py,sha256=gRq3-xr2oYIzudgwDwMj3Zl5Pb0B8tDdnGKUB0WIV_o,32427
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
code_intelligence-3.0.1.dist-info/METADATA,sha256=ScA4qConScZC4WNjwdRekYeFFaDLAVRcFk1Y1nTNogY,100
|
|
2
|
-
code_intelligence-3.0.1.dist-info/RECORD,,
|
|
3
|
-
code_intelligence-3.0.1.dist-info/WHEEL,sha256=aD7J6E7Slys9i0J65v6Ehfi0DHYa5rImRhUDp62Iwh0,98
|
|
4
|
-
code_intelligence/__init__.py,sha256=QPD-ZdurftMeM2nYpl6NVgnxjh-s-_E7q3n9eg3RgJo,327
|
|
5
|
-
code_intelligence/goober.py,sha256=tX_P4EByTn6JXeUbrN1Su-eQt4EfblQwidjk5Wt9cMo,6217
|
|
6
|
-
code_intelligence/libcode_intelligence.h,sha256=GN6gPx-vEG02Ltak29nGSX8rsxDlrjIkI-Tr_xBeet8,3059
|
|
7
|
-
code_intelligence/libcode_intelligence.so,sha256=sJB2jhC1GH0V3umiQhpaKwtf6pSPja3aS0n2rgoLnR8,2827264
|
|
8
|
-
code_intelligence/symdb.py,sha256=gRq3-xr2oYIzudgwDwMj3Zl5Pb0B8tDdnGKUB0WIV_o,32427
|
|
File without changes
|