Function
python_setattr
(jsobj: PyProxy, jskey: any, jsval: any)
Source from the content-addressed store, hash-verified
| 2124 | } |
| 2125 | |
| 2126 | function python_setattr(jsobj: PyProxy, jskey: any, jsval: any) { |
| 2127 | let ptrobj = _getPtr(jsobj); |
| 2128 | let err; |
| 2129 | try { |
| 2130 | Py_ENTER(); |
| 2131 | err = __pyproxy_setattr(ptrobj, jskey, jsval); |
| 2132 | Py_EXIT(); |
| 2133 | } catch (e) { |
| 2134 | API.fatal_error(e); |
| 2135 | } |
| 2136 | if (err === -1) { |
| 2137 | _pythonexc2js(); |
| 2138 | } |
| 2139 | } |
| 2140 | |
| 2141 | function python_delattr(jsobj: PyProxy, jskey: any) { |
| 2142 | let ptrobj = _getPtr(jsobj); |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…