Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python embedding: fix symbol conflicts with python library (OSGeo#3215)
there is a project called pystack . which used to print the python process's stack info . pystack will use gdb to attach the python process and call some function defined in python's executable file or python library such as call (void *) PyGILState_Ensure() call (void) PyRun_SimpleString("exec(r\"f = open('/tmp/pystack', 'w'); \ itervalues = lambda d:getattr(d,'itervalues',d.values)();import gc,traceback,itertools,sys; \ f.write('Dumping Threads\\n\\n\\n');f.write('\\n---------------\\n'.join(str(traceback.format_stack(o) ) for o in itervalues(sys._current_frames())));f.close()\")") ... but the symbol PyGILState_Ensure also defined in gdal .so if a python script use gdal , we can't use pystack to debug this . so i changed the symbol of gdal by add Lib infix Co-authored-by: kk <kaihaojiang@tencent.com>
- Loading branch information