File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
6
7
7
## Unreleased - YYYY-MM-DD
8
8
9
+ ### Added
10
+ * Added deprecated ` Object::get_ivar ` and ` Object::get_mut_ivar ` to make
11
+ upgrading easier.
12
+
9
13
10
14
## 0.3.0-alpha.6 - 2022-01-03
11
15
Original file line number Diff line number Diff line change @@ -557,6 +557,13 @@ impl Object {
557
557
unsafe { & * ptr }
558
558
}
559
559
560
+ /// Use [`ivar`](`Self::ivar`) instead.
561
+ #[ deprecated = "Use `Object::ivar` instead." ]
562
+ pub unsafe fn get_ivar < T : Encode > ( & self , name : & str ) -> & T {
563
+ // SAFETY: Upheld by caller
564
+ unsafe { self . ivar ( name) }
565
+ }
566
+
560
567
/// Returns a mutable reference to the ivar with the given name.
561
568
///
562
569
/// # Panics
@@ -577,6 +584,13 @@ impl Object {
577
584
unsafe { & mut * ptr }
578
585
}
579
586
587
+ /// Use [`ivar_mut`](`Self::ivar_mut`) instead.
588
+ #[ deprecated = "Use `Object::ivar_mut` instead." ]
589
+ pub unsafe fn get_mut_ivar < T : Encode > ( & mut self , name : & str ) -> & mut T {
590
+ // SAFETY: Upheld by caller
591
+ unsafe { self . ivar_mut ( name) }
592
+ }
593
+
580
594
/// Sets the value of the ivar with the given name.
581
595
///
582
596
/// # Panics
You can’t perform that action at this time.
0 commit comments