Return the dictionary object that implements module's namespace; this object is the same as the `__dict__` attribute of the module object.
(&self, py: Python)
| 48 | /// Return the dictionary object that implements module's namespace; |
| 49 | /// this object is the same as the `__dict__` attribute of the module object. |
| 50 | pub fn dict(&self, py: Python) -> PyDict { |
| 51 | unsafe { |
| 52 | let r = PyObject::from_borrowed_ptr(py, ffi::PyModule_GetDict(self.0.as_ptr())); |
| 53 | r.unchecked_cast_into::<PyDict>() |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | unsafe fn str_from_ptr<'a>(&'a self, py: Python, ptr: *const c_char) -> PyResult<&'a str> { |
| 58 | if ptr.is_null() { |