diff --git a/builder/build_pymeos_functions.py b/builder/build_pymeos_functions.py index 503dfee..532ef2f 100644 --- a/builder/build_pymeos_functions.py +++ b/builder/build_pymeos_functions.py @@ -59,12 +59,6 @@ def __init__(self, ctype: str, ptype: str, conversion: str | None) -> None: self.conversion = conversion -# List of functions defined in functions.py that shouldn't be exported - -hidden_functions = [ - "_check_error", -] - # List of MEOS functions that should not be defined in functions.py skipped_functions = [ "py_error_handler", @@ -214,7 +208,9 @@ def build_pymeos_functions(idl_path="builder/meos-idl.json", header_path="builde function_text = "" for fn in matches: function_name = fn.group(1) - if function_name in hidden_functions: + # A name with a leading underscore is a helper of the generated wrappers, such + # as _check_error or _take_string, and stays out of the package's exports + if function_name.startswith("_"): continue function_text += f" '{function_name}',\n" functions.append(function_name) diff --git a/pymeos_cffi/__init__.py b/pymeos_cffi/__init__.py index 2db6b03..6ac73d9 100644 --- a/pymeos_cffi/__init__.py +++ b/pymeos_cffi/__init__.py @@ -35,9 +35,6 @@ "SpatialRelation", # Functions "py_error_handler", - "_read_string", - "_take_string", - "_take_bytes", "create_pointer", "get_address", "datetime_to_timestamptz",