code-intelligence 3.3.1__py3-none-win_amd64.whl → 3.3.2__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 +26 -19
- code_intelligence/libcode_intelligence.so +0 -0
- {code_intelligence-3.3.1.dist-info → code_intelligence-3.3.2.dist-info}/METADATA +1 -1
- code_intelligence-3.3.2.dist-info/RECORD +8 -0
- code_intelligence-3.3.1.dist-info/RECORD +0 -8
- {code_intelligence-3.3.1.dist-info → code_intelligence-3.3.2.dist-info}/WHEEL +0 -0
code_intelligence/__init__.py
CHANGED
code_intelligence/goober.py
CHANGED
|
@@ -50,12 +50,6 @@ _lib.get_pending_tasks_count.restype = C.c_uint64
|
|
|
50
50
|
_lib.free_memory.argtypes = [C.c_void_p]
|
|
51
51
|
_lib.free_memory.restype = None
|
|
52
52
|
|
|
53
|
-
# --- CPYTHON C API ACCESS ---
|
|
54
|
-
C.pythonapi.Py_IncRef.argtypes = [C.py_object]
|
|
55
|
-
C.pythonapi.Py_IncRef.restype = None
|
|
56
|
-
C.pythonapi.Py_DecRef.argtypes = [C.py_object]
|
|
57
|
-
C.pythonapi.Py_DecRef.restype = None
|
|
58
|
-
|
|
59
53
|
|
|
60
54
|
def positional_repr(cls):
|
|
61
55
|
def __repr__(self):
|
|
@@ -77,26 +71,39 @@ class Definition_Link:
|
|
|
77
71
|
|
|
78
72
|
# IMPORTANT: KEEP THIS ALIVE FOR GO THREAD WORKER
|
|
79
73
|
C_NO_CALLBACK = SCAN_CALLBACK(0)
|
|
74
|
+
_KEEPALIVE = dict[int, tuple]()
|
|
80
75
|
|
|
81
76
|
|
|
82
77
|
def _wrap_data_ptr(tup: tuple):
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
return id(tup) # C.cast(obj, C.c_void_p)
|
|
88
|
-
|
|
78
|
+
ptr = id(tup)
|
|
79
|
+
_KEEPALIVE[ptr] = tup
|
|
80
|
+
return ptr
|
|
89
81
|
|
|
90
|
-
def _unwrap_data_ptr(data_ptr) -> tuple:
|
|
91
|
-
assert data_ptr != 0, "we got NULL"
|
|
92
82
|
|
|
93
|
-
|
|
83
|
+
def _unwrap_data_ptr(ptr) -> tuple:
|
|
84
|
+
tup = _KEEPALIVE.pop(ptr, None)
|
|
85
|
+
assert tup is not None, "keepalive missing for callback"
|
|
86
|
+
return tup
|
|
94
87
|
|
|
95
|
-
# MANUALLY DECREMENT THE REFERENCE COUNT.
|
|
96
|
-
# We are fulfilling our promise
|
|
97
|
-
C.pythonapi.Py_DecRef(C.py_object(tup))
|
|
98
88
|
|
|
99
|
-
|
|
89
|
+
# def _wrap_data_ptr(tup: tuple):
|
|
90
|
+
# # MANUALLY INCREMENT THE REFERENCE COUNT
|
|
91
|
+
# # We are now responsible for its lifetime
|
|
92
|
+
# C.pythonapi.Py_IncRef(C.py_object(tup))
|
|
93
|
+
#
|
|
94
|
+
# return id(tup) # C.cast(obj, C.c_void_p)
|
|
95
|
+
#
|
|
96
|
+
#
|
|
97
|
+
# def _unwrap_data_ptr(data_ptr) -> tuple:
|
|
98
|
+
# assert data_ptr != 0, "we got NULL"
|
|
99
|
+
#
|
|
100
|
+
# tup = C.cast(data_ptr, C.py_object).value
|
|
101
|
+
#
|
|
102
|
+
# # MANUALLY DECREMENT THE REFERENCE COUNT.
|
|
103
|
+
# # We are fulfilling our promise
|
|
104
|
+
# C.pythonapi.Py_DecRef(C.py_object(tup))
|
|
105
|
+
#
|
|
106
|
+
# return tup
|
|
100
107
|
|
|
101
108
|
|
|
102
109
|
def scan_file(file, language: Language, callback=None, data=None) -> bool:
|
|
Binary file
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
code_intelligence-3.3.2.dist-info/METADATA,sha256=8CbUIUnddfvjcSVE89vgiuoqj4Rgsg6qLJSzxFdnwaI,100
|
|
2
|
+
code_intelligence-3.3.2.dist-info/RECORD,,
|
|
3
|
+
code_intelligence-3.3.2.dist-info/WHEEL,sha256=aD7J6E7Slys9i0J65v6Ehfi0DHYa5rImRhUDp62Iwh0,98
|
|
4
|
+
code_intelligence/__init__.py,sha256=OqMfhLblRbAVpTR0VKo2Ap-J4XKuDY-PaiqEv9N3zCU,587
|
|
5
|
+
code_intelligence/goober.py,sha256=CGwX8hulLbiJFx05u0hMYGXnbQnfYBmyyFildhj0ziQ,6622
|
|
6
|
+
code_intelligence/libcode_intelligence.h,sha256=9iy0xXcOpq366DuiKw1cw4-7VNz-QPAYBNJGZKEh12M,3169
|
|
7
|
+
code_intelligence/libcode_intelligence.so,sha256=Ls1qokhJ_5xlgUNDu4xBRjMeJIWL1ySiNz0yE_Pfh1w,2840576
|
|
8
|
+
code_intelligence/symdb.py,sha256=gRq3-xr2oYIzudgwDwMj3Zl5Pb0B8tDdnGKUB0WIV_o,32427
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
code_intelligence-3.3.1.dist-info/METADATA,sha256=w-DvM6pR4uWVpKsguom5rlXqeWBYdtudT4Rrf5-_AFg,100
|
|
2
|
-
code_intelligence-3.3.1.dist-info/RECORD,,
|
|
3
|
-
code_intelligence-3.3.1.dist-info/WHEEL,sha256=aD7J6E7Slys9i0J65v6Ehfi0DHYa5rImRhUDp62Iwh0,98
|
|
4
|
-
code_intelligence/__init__.py,sha256=iG0BcJz8lbGitiiOrnzZ7R9fIY9blHehoQ9Kmpu1PBw,587
|
|
5
|
-
code_intelligence/goober.py,sha256=4MYEegk26-GfaOOsd8ufREYqFRq0nNmDs6jiBq-kD6s,6510
|
|
6
|
-
code_intelligence/libcode_intelligence.h,sha256=9iy0xXcOpq366DuiKw1cw4-7VNz-QPAYBNJGZKEh12M,3169
|
|
7
|
-
code_intelligence/libcode_intelligence.so,sha256=gbNPCTEzVkKwp1m7h16dQqyWvnhosxpXCWEUbRTqwh0,2840576
|
|
8
|
-
code_intelligence/symdb.py,sha256=gRq3-xr2oYIzudgwDwMj3Zl5Pb0B8tDdnGKUB0WIV_o,32427
|
|
File without changes
|