[all-commits] [llvm/llvm-project] 3ca85e: [lldb] Handle staticmethod/classmethod descriptors...
Med Ismail Bennani via All-commits
all-commits at lists.llvm.org
Mon Dec 1 13:13:04 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3ca85e74a1af2771ea46519107e6d366316a03ee
https://github.com/llvm/llvm-project/commit/3ca85e74a1af2771ea46519107e6d366316a03ee
Author: Med Ismail Bennani <ismail at bennani.ma>
Date: 2025-12-01 (Mon, 01 Dec 2025)
Changed paths:
M lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h
M lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
Log Message:
-----------
[lldb] Handle staticmethod/classmethod descriptors in ScriptedPythonInterface (#170188)
Extract `__func__` attribute from staticmethod/classmethod descriptors
before treating them as callables. Python's `@staticmethod` and
`@classmethod` decorators wrap methods in descriptor objects that are
not directly usable as PythonCallable, when calling PyCallable_Check.
The actual callable function is stored in the `__func__` attribute of
these descriptors, so we need to unwrap them to properly validate and
invoke the decorated methods in scripted interfaces.
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list