We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04ba564 commit 31b76b1Copy full SHA for 31b76b1
src/lib.rs
@@ -159,11 +159,16 @@ fn decode_dag_cbor_to_pyobject<R: Read + Seek>(
159
}
160
161
162
- let key_py = string_new_bound(py, key.as_slice()).to_object(py);
+ let key_py = string_new_bound(py, key.as_slice());
163
prev_key = Some(key);
164
165
let value = decode_dag_cbor_to_pyobject(py, r, deep + 1)?;
166
- dict.set_item(key_py, value).unwrap();
+ // dict.set_item(key_py, value).unwrap();
167
+
168
+ // TODO(MarshalX): add error check
169
+ unsafe {
170
+ ffi::PyDict_SetItem(dict.as_ptr(), key_py.as_ptr(), value.as_ptr());
171
+ }
172
173
174
dict.to_object(py)
0 commit comments