code-intelligence 2.0.0__py3-none-win_amd64.whl → 2.0.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.
@@ -2,6 +2,7 @@ from .symdb import (
2
2
  Language,
3
3
  SymbolType,
4
4
  Symbol,
5
+ SymbolLink,
5
6
  Location,
6
7
  ImmediateSymbolDatabase,
7
8
  LazySymbolDatabase,
@@ -9,13 +10,14 @@ from .symdb import (
9
10
  AsyncResult,
10
11
  )
11
12
 
12
- __version__ = "2.0.0"
13
+ __version__ = "2.0.2"
13
14
  __version_info__ = tuple(int(i) for i in __version__.split('.'))
14
15
 
15
16
  __all__ = [
16
17
  "Language",
17
18
  "SymbolType",
18
19
  "Symbol",
20
+ "SymbolLink",
19
21
  "Location",
20
22
  "ImmediateSymbolDatabase",
21
23
  "LazySymbolDatabase",
Binary file
@@ -239,7 +239,7 @@ _lib.enqueue_update_file.restype = ctypes.c_uint64
239
239
  _lib.enqueue_find_definitions.argtypes = [ctypes.c_char_p]
240
240
  _lib.enqueue_find_definitions.restype = ctypes.c_uint64
241
241
 
242
- _lib.enqueue_find_references.argtypes = [ctypes.c_char_p]
242
+ _lib.enqueue_find_references.argtypes = [ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint32]
243
243
  _lib.enqueue_find_references.restype = ctypes.c_uint64
244
244
 
245
245
  _lib.enqueue_get_symbol.argtypes = [ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint32]
@@ -292,7 +292,7 @@ _lib.symbol_db_update_file.restype = ctypes.c_bool
292
292
  _lib.symbol_db_find_definitions.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_uint32)]
293
293
  _lib.symbol_db_find_definitions.restype = ctypes.POINTER(_Symbol)
294
294
 
295
- _lib.symbol_db_find_references.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_uint32)]
295
+ _lib.symbol_db_find_references.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint32, ctypes.POINTER(ctypes.c_uint32)]
296
296
  _lib.symbol_db_find_references.restype = ctypes.POINTER(_Symbol)
297
297
 
298
298
  _lib.symbol_db_get_all_symbols.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)]
@@ -712,11 +712,13 @@ class ImmediateSymbolDatabase(_BaseSymbolDatabase):
712
712
  def find_symbols(self, symbol_name: str) -> list[Symbol]:
713
713
  return self.find_definitions(symbol_name)
714
714
 
715
- def find_references(self, symbol_name: str) -> list[Symbol]:
715
+ def find_references(self, path: Path_Like, line: int, column: int) -> list[Symbol]:
716
716
  count = ctypes.c_uint32(0)
717
717
  ptr = _lib.symbol_db_find_references(
718
718
  self._handle,
719
- symbol_name.encode("utf-8"),
719
+ os.fsencode(path),
720
+ ctypes.c_uint32(line),
721
+ ctypes.c_uint32(column),
720
722
  ctypes.byref(count),
721
723
  )
722
724
  return _convert_symbol_array(ptr, int(count.value))
@@ -750,11 +752,13 @@ class LazySymbolDatabase(_BaseSymbolDatabase):
750
752
  def find_symbols(self, symbol_name: str) -> SymbolArrayView:
751
753
  return self.find_definitions(symbol_name)
752
754
 
753
- def find_references(self, symbol_name: str) -> SymbolArrayView:
755
+ def find_references(self, path: Path_Like, line: int, column: int) -> SymbolArrayView:
754
756
  count = ctypes.c_uint32(0)
755
757
  ptr = _lib.symbol_db_find_references(
756
758
  self._handle,
757
- symbol_name.encode("utf-8"),
759
+ os.fsencode(path),
760
+ ctypes.c_uint32(line),
761
+ ctypes.c_uint32(column),
758
762
  ctypes.byref(count),
759
763
  )
760
764
  return _convert_symbol_array_lazy(ptr, int(count.value))
@@ -823,9 +827,9 @@ class AsyncSymbolDatabase:
823
827
  """Asynchronously find symbol definitions. Returns request ID."""
824
828
  return _lib.enqueue_find_definitions(symbol_name.encode("utf-8"))
825
829
 
826
- def async_find_references(self, symbol_name: str) -> int:
827
- """Asynchronously find symbol references. Returns request ID."""
828
- return _lib.enqueue_find_references(symbol_name.encode("utf-8"))
830
+ def async_find_references(self, filename: Path_Like, line: int, column: int) -> int:
831
+ """Asynchronously find references for a symbol at filename:line:column. Returns request ID."""
832
+ return _lib.enqueue_find_references(os.fsencode(filename), ctypes.c_uint32(line), ctypes.c_uint32(column))
829
833
 
830
834
  def async_get_symbol(self, path: Path_Like, line: int, column: int) -> int:
831
835
  """Asynchronously get symbol at position. Returns request ID."""
@@ -1,4 +1,4 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: code_intelligence
3
- Version: 2.0.0
3
+ Version: 2.0.2
4
4
  Summary: Code intelligence library
@@ -0,0 +1,6 @@
1
+ code_intelligence-2.0.2.dist-info/METADATA,sha256=8VQm-3UWGdDOH4xdvXuTAA16F--cu8OQ9nYQOvJqzSo,100
2
+ code_intelligence-2.0.2.dist-info/RECORD,,
3
+ code_intelligence-2.0.2.dist-info/WHEEL,sha256=aD7J6E7Slys9i0J65v6Ehfi0DHYa5rImRhUDp62Iwh0,98
4
+ code_intelligence/__init__.py,sha256=JUcG5hLPvopKlYtD02xoEhoYzVImwWO-TJITknRZZGQ,527
5
+ code_intelligence/_code_intelligence.dll,sha256=wFdz8sbeS2o-TR6RSWFYktcPlXMQI85HSPKcsH7-4LA,6662144
6
+ code_intelligence/symdb.py,sha256=gRq3-xr2oYIzudgwDwMj3Zl5Pb0B8tDdnGKUB0WIV_o,32427
@@ -1,6 +0,0 @@
1
- code_intelligence-2.0.0.dist-info/METADATA,sha256=EDXSspHEEoYpLkTJ52CazS6p4HaznuARbkNMI_6UVIs,100
2
- code_intelligence-2.0.0.dist-info/RECORD,,
3
- code_intelligence-2.0.0.dist-info/WHEEL,sha256=aD7J6E7Slys9i0J65v6Ehfi0DHYa5rImRhUDp62Iwh0,98
4
- code_intelligence/__init__.py,sha256=EOoNrQHv474BaMTfhwgUrwgeE781tD0YmMip-_0WxX4,491
5
- code_intelligence/_code_intelligence.dll,sha256=AGjvz9T_rvRZqKiCeY_ICqWgGfBY-mZ7Gposte5fXLA,6655488
6
- code_intelligence/symdb.py,sha256=zjI9NgTD-nCMoEgFPeZpOVa8rC_Vxh2GTgY8yy4Jskk,32086