This repository was archived by the owner on Jun 8, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,14 @@ macro_rules! glib_boxed_wrapper {
205
205
}
206
206
}
207
207
208
+ #[ doc( hidden) ]
209
+ impl $crate:: translate:: FromGlibPtrBorrow <* const $ffi_name> for $name {
210
+ #[ inline]
211
+ unsafe fn from_glib_borrow( ptr: * const $ffi_name) -> Self {
212
+ $crate:: translate:: from_glib_borrow( ptr as * mut $ffi_name)
213
+ }
214
+ }
215
+
208
216
#[ doc( hidden) ]
209
217
impl $crate:: translate:: FromGlibContainerAsVec <* mut $ffi_name, * mut * mut $ffi_name> for $name {
210
218
unsafe fn from_glib_none_num_as_vec( ptr: * mut * mut $ffi_name, num: usize ) -> Vec <Self > {
Original file line number Diff line number Diff line change @@ -531,6 +531,15 @@ macro_rules! glib_object_wrapper {
531
531
}
532
532
}
533
533
534
+ #[ doc( hidden) ]
535
+ impl $crate:: translate:: FromGlibPtrBorrow <* const $ffi_name> for $name {
536
+ #[ inline]
537
+ #[ cfg_attr( feature = "cargo-clippy" , allow( cast_ptr_alignment) ) ]
538
+ unsafe fn from_glib_borrow( ptr: * const $ffi_name) -> Self {
539
+ $crate:: translate:: from_glib_borrow( ptr as * mut $ffi_name)
540
+ }
541
+ }
542
+
534
543
#[ doc( hidden) ]
535
544
impl $crate:: translate:: FromGlibContainerAsVec <* mut $ffi_name, * mut * mut $ffi_name> for $name {
536
545
unsafe fn from_glib_none_num_as_vec( ptr: * mut * mut $ffi_name, num: usize ) -> Vec <Self > {
Original file line number Diff line number Diff line change @@ -184,6 +184,14 @@ macro_rules! glib_shared_wrapper {
184
184
}
185
185
}
186
186
187
+ #[ doc( hidden) ]
188
+ impl $crate:: translate:: FromGlibPtrBorrow <* const $ffi_name> for $name {
189
+ #[ inline]
190
+ unsafe fn from_glib_borrow( ptr: * const $ffi_name) -> Self {
191
+ $crate:: translate:: from_glib_borrow( ptr as * mut $ffi_name)
192
+ }
193
+ }
194
+
187
195
#[ doc( hidden) ]
188
196
impl $crate:: translate:: FromGlibContainerAsVec <* mut $ffi_name, * mut * mut $ffi_name> for $name {
189
197
unsafe fn from_glib_none_num_as_vec( ptr: * mut * mut $ffi_name, num: usize ) -> Vec <Self > {
You can’t perform that action at this time.
0 commit comments