Commit b1272a9
committed
[lldb] Handle staticmethod/classmethod descriptors in ScriptedPythonInterface
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
decorated methods in scripted interfaces.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>1 parent a941e15 commit b1272a9
File tree
1 file changed
+12
-1
lines changed- lldb/source/Plugins/ScriptInterpreter/Python/Interfaces
1 file changed
+12
-1
lines changedLines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
85 | 96 | | |
86 | 97 | | |
87 | 98 | | |
| |||
0 commit comments