From e0d2472ee1d855ee00a02c3babfca6e7a118bb1c Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 13 Nov 2024 17:32:50 -0600 Subject: [PATCH] Update python/libcuspatial/libcuspatial/load.py Co-authored-by: Vyas Ramasubramani --- python/libcuspatial/libcuspatial/load.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/python/libcuspatial/libcuspatial/load.py b/python/libcuspatial/libcuspatial/load.py index 0a6f3966c..df1a07ee3 100644 --- a/python/libcuspatial/libcuspatial/load.py +++ b/python/libcuspatial/libcuspatial/load.py @@ -16,10 +16,12 @@ import ctypes import os -# RTLD_LOCAL is here for safety... using it loads symbols into the -# library-specific table maintained by the loader, but not into the -# global namespace where they may conflict with symbols from other -# loaded DSOs. +# Loading with RTLD_LOCAL adds the library itself to the loader's +# loaded library cache without loading any symbols into the global +# namespace. This allows libraries that express a dependency on +# this library to be loaded later and successfully satisfy this dependency +# without polluting the global symbol table with symbols from +# libcuspatial that could conflict with symbols from other DSOs. PREFERRED_LOAD_FLAG = ctypes.RTLD_LOCAL