code-intelligence 3.3.3__py3-none-win_amd64.whl → 3.4.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 +1 -1
- code_intelligence/goober.py +3 -8
- code_intelligence/libcode_intelligence.h +2 -2
- code_intelligence/libcode_intelligence.so +0 -0
- {code_intelligence-3.3.3.dist-info → code_intelligence-3.4.0.dist-info}/METADATA +1 -1
- code_intelligence-3.4.0.dist-info/RECORD +8 -0
- code_intelligence-3.3.3.dist-info/RECORD +0 -8
- {code_intelligence-3.3.3.dist-info → code_intelligence-3.4.0.dist-info}/WHEEL +0 -0
code_intelligence/__init__.py
CHANGED
code_intelligence/goober.py
CHANGED
|
@@ -8,11 +8,6 @@ from dataclasses import dataclass, fields
|
|
|
8
8
|
from enum import IntEnum, IntFlag
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
# Disable Go async preemption to avoid SIGURG conflicts on macOS arm64
|
|
12
|
-
if platform.system() == 'Darwin' and platform.machine() == 'arm64':
|
|
13
|
-
os.environ.setdefault('GODEBUG', 'asyncpreemptoff=1')
|
|
14
|
-
|
|
15
|
-
|
|
16
11
|
DIR = Path(__file__).parent
|
|
17
12
|
|
|
18
13
|
_lib = C.CDLL(str(DIR / "libcode_intelligence.so"))
|
|
@@ -31,7 +26,7 @@ class Definition_Link_C(C.Structure):
|
|
|
31
26
|
]
|
|
32
27
|
|
|
33
28
|
FIND_CALLBACK = C.CFUNCTYPE(None, C.c_void_p, C.POINTER(Definition_Link_C), C.c_int, C.c_void_p)
|
|
34
|
-
_lib.enqueue_find_symbols_in_text.argtypes = [FIND_CALLBACK, C.c_void_p, C.c_char_p]
|
|
29
|
+
_lib.enqueue_find_symbols_in_text.argtypes = [FIND_CALLBACK, C.c_void_p, C.c_char_p, C.c_bool]
|
|
35
30
|
_lib.enqueue_find_symbols_in_text.restype = None
|
|
36
31
|
|
|
37
32
|
_lib.enqueue_stop.argtypes = []
|
|
@@ -130,14 +125,14 @@ def C_AFTER_SCAN(data_ptr):
|
|
|
130
125
|
callback(data)
|
|
131
126
|
|
|
132
127
|
|
|
133
|
-
def find_symbols_in_text(text: str, callback=None, data=None) -> bool:
|
|
128
|
+
def find_symbols_in_text(text: str, callback=None, data=None, sync: bool = False) -> bool:
|
|
134
129
|
if callback is None:
|
|
135
130
|
c_callback, data_ptr = C_NO_CALLBACK, 0
|
|
136
131
|
else:
|
|
137
132
|
c_callback, data_ptr = C_AFTER_FIND, _wrap_data_ptr((callback, data))
|
|
138
133
|
|
|
139
134
|
# print("[PY] sending find_symbols_in_text")
|
|
140
|
-
_lib.enqueue_find_symbols_in_text(c_callback, data_ptr, text.encode())
|
|
135
|
+
_lib.enqueue_find_symbols_in_text(c_callback, data_ptr, text.encode(), sync)
|
|
141
136
|
|
|
142
137
|
# never drop the request (it would be a memory leak)
|
|
143
138
|
return True
|
|
@@ -25,7 +25,7 @@ extern const char *_GoStringPtr(_GoString_ s);
|
|
|
25
25
|
|
|
26
26
|
#include <stdint.h>
|
|
27
27
|
#include <stdlib.h>
|
|
28
|
-
#include <
|
|
28
|
+
#include <stdbool.h>
|
|
29
29
|
|
|
30
30
|
typedef struct {
|
|
31
31
|
uint32_t start_offset_in_text;
|
|
@@ -110,7 +110,7 @@ extern "C" {
|
|
|
110
110
|
|
|
111
111
|
extern __declspec(dllexport) void start_workers(void);
|
|
112
112
|
extern __declspec(dllexport) void enqueue_scan_file(scan_callback_t callback, uintptr_t data, char* c_path, GoUint64 language);
|
|
113
|
-
extern __declspec(dllexport) void enqueue_find_symbols_in_text(find_callback_t callback, uintptr_t data, char* c_text);
|
|
113
|
+
extern __declspec(dllexport) void enqueue_find_symbols_in_text(find_callback_t callback, uintptr_t data, char* c_text, _Bool synchronous);
|
|
114
114
|
extern __declspec(dllexport) void enqueue_stop(void);
|
|
115
115
|
extern __declspec(dllexport) void enqueue_clear(void);
|
|
116
116
|
extern __declspec(dllexport) GoUint64 get_pending_tasks_count(void);
|
|
Binary file
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
code_intelligence-3.4.0.dist-info/METADATA,sha256=NbxgVAiOKqf0ekvdB_ViSinHq9LmUJgNpCOJ0LLBr2o,100
|
|
2
|
+
code_intelligence-3.4.0.dist-info/RECORD,,
|
|
3
|
+
code_intelligence-3.4.0.dist-info/WHEEL,sha256=aD7J6E7Slys9i0J65v6Ehfi0DHYa5rImRhUDp62Iwh0,98
|
|
4
|
+
code_intelligence/__init__.py,sha256=1oMdT0jam-Da6zTkWZj5u6yNwIV5CoYRfa0VNS-POog,587
|
|
5
|
+
code_intelligence/goober.py,sha256=rRIxxms-Wztb2qem1jnO2TGnieiJhUXkJaTbIAJy5mc,6655
|
|
6
|
+
code_intelligence/libcode_intelligence.h,sha256=48WvRKF-yymFee7BddCrsbgw80L6hnmW6sMb7bd4sck,3189
|
|
7
|
+
code_intelligence/libcode_intelligence.so,sha256=zyMIiTcl26qcYh9I4yp-Ti5vYWpBrmuaz_s_c1reFwA,2841088
|
|
8
|
+
code_intelligence/symdb.py,sha256=gRq3-xr2oYIzudgwDwMj3Zl5Pb0B8tDdnGKUB0WIV_o,32427
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
code_intelligence-3.3.3.dist-info/METADATA,sha256=dZ1UOIKtuG34DZCIrjHJlLpV499VkMqPkyVN0naJDb4,100
|
|
2
|
-
code_intelligence-3.3.3.dist-info/RECORD,,
|
|
3
|
-
code_intelligence-3.3.3.dist-info/WHEEL,sha256=aD7J6E7Slys9i0J65v6Ehfi0DHYa5rImRhUDp62Iwh0,98
|
|
4
|
-
code_intelligence/__init__.py,sha256=o-yfyUiB9bLcBEJzFKbpczJ5idimBnqZaxgvVEitRkA,587
|
|
5
|
-
code_intelligence/goober.py,sha256=Kh8_ElPoejnYxfOTqacN1vXXXQRM9ybxjzihbjhT-VA,6823
|
|
6
|
-
code_intelligence/libcode_intelligence.h,sha256=9iy0xXcOpq366DuiKw1cw4-7VNz-QPAYBNJGZKEh12M,3169
|
|
7
|
-
code_intelligence/libcode_intelligence.so,sha256=Go_VDtXp_gwe-CHNHlELaEonzjd8iVurulX71vjzEDs,2840576
|
|
8
|
-
code_intelligence/symdb.py,sha256=gRq3-xr2oYIzudgwDwMj3Zl5Pb0B8tDdnGKUB0WIV_o,32427
|
|
File without changes
|