Commit 6c163c2
committed
fix(ctypes): validate argument types before binding shared library functions
- Add explicit validation for ctypes function argument declarations before
assigning them to the loaded shared library function.
- This provides clearer error messages when invalid Python types are passed
to `argtypes`, instead of exposing the internal ctypes error about missing
`from_param()` methods.
Signed-off-by: JamePeng <jame_peng@sina.com>1 parent 083c4b5 commit 6c163c2
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
247 | 259 | | |
248 | 260 | | |
249 | 261 | | |
| |||
0 commit comments