Skip to content

Commit

Permalink
Refine explanation for function HPyDevel.get_static_libs
Browse files Browse the repository at this point in the history
  • Loading branch information
fangerer committed Nov 23, 2022
1 parent 07a0554 commit d126697
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions hpy/devel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,17 @@ def _scan_static_lib_dir(self):
return available_libs

def get_static_libs(self, hpy_abi):
""" A list of extra static libraries to compile with. For example,
there is library 'hpyhelpers' which contains compiled HPy helper
functions like 'HPyArg_Parse' and such. Libraries are always
specific to an ABI. The list may be empty if no libraries are
available for a certain ABI.
""" The list of necessary static libraries an HPy extension needs to
link to or 'None' (if not available). The HPy ext needs to link to
all static libraries in the list otherwise some function may stay
unresolved. For example, there is library 'hpyextra' which contains
compiled HPy helper functions like 'HPyArg_Parse' and such.
Libraries are always specific to an ABI.
"""
if not self._available_static_libs:
# lazily initialize the dict of available (=shipped) static libs
self._available_static_libs = self._scan_static_lib_dir()
return self._available_static_libs.get(hpy_abi, [])
return self._available_static_libs.get(hpy_abi, None)

def get_ctx_sources(self):
""" Extra sources needed only in the CPython ABI mode.
Expand Down

0 comments on commit d126697

Please sign in to comment.