Commit 1fed0ae
authored
[FFI][Reflection] Lazily resolve KWARGS sentinel in auto-init (#519)
This PR intends to avoid the eager lookup of `ffi.GetKwargsObject`
during `MakeInit` construction. Instead, it resolves and caches the
KWARGS sentinel via a function-local static (`GetKwargsSentinel`) when
`__ffi_init__` is invoked. This removes static-init order dependence
between reflection auto-init registration and global function
registration, preventing `Function ffi.GetKwargsObject not found`
failures.1 parent 61f90eb commit 1fed0ae
1 file changed
+11
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
65 | 74 | | |
66 | 75 | | |
67 | 76 | | |
| |||
118 | 127 | | |
119 | 128 | | |
120 | 129 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | 130 | | |
126 | | - | |
| 131 | + | |
| 132 | + | |
127 | 133 | | |
128 | 134 | | |
129 | 135 | | |
| |||
0 commit comments