(
&'static self,
ctx: &Context,
class: &'static Py<PyType>,
)
| 209 | } |
| 210 | |
| 211 | pub fn build_staticmethod( |
| 212 | &'static self, |
| 213 | ctx: &Context, |
| 214 | class: &'static Py<PyType>, |
| 215 | ) -> PyRef<PyNativeMethod> { |
| 216 | debug_assert!(self.flags.contains(PyMethodFlags::STATIC)); |
| 217 | // Set zelf to the class (m_self = type for static methods). |
| 218 | // Callable::call skips prepending when STATIC flag is set. |
| 219 | let func = PyNativeFunction { |
| 220 | zelf: Some(class.to_owned().into()), |
| 221 | value: self, |
| 222 | module: None, |
| 223 | _method_def_owner: None, |
| 224 | }; |
| 225 | PyNativeMethod { func, class }.into_ref(ctx) |
| 226 | } |
| 227 | |
| 228 | #[doc(hidden)] |
| 229 | pub const fn __const_concat_arrays<const SUM_LEN: usize>( |
no test coverage detected