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.
ValueArray
1 parent 254693c commit a2c8bbaCopy full SHA for a2c8bba
glib/src/param_spec.rs
@@ -1462,11 +1462,18 @@ impl ParamSpecValueArray {
1462
1463
#[doc(alias = "get_element_spec")]
1464
#[inline]
1465
- pub fn element_spec(&self) -> Option<ParamSpec> {
+ pub fn element_spec(&self) -> Option<&ParamSpec> {
1466
unsafe {
1467
let ptr = ToGlibPtr::<*const gobject_ffi::GParamSpecValueArray>::to_glib_none(self).0;
1468
1469
- from_glib_none((*ptr).element_spec)
+ if (*ptr).element_spec.is_null() {
1470
+ None
1471
+ } else {
1472
+ Some(
1473
+ &*(&(*ptr).element_spec as *const *mut gobject_ffi::GParamSpec
1474
+ as *const ParamSpec),
1475
+ )
1476
+ }
1477
}
1478
1479
0 commit comments