File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
- refs/heads/try: e325146eb436c4995385d8220ff7ac3a4a5f62ab
5
+ refs/heads/try: 3b8097daccf2d0d4da78f4ca0f98aa2043dea299
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Original file line number Diff line number Diff line change @@ -49,7 +49,13 @@ fn mut_offset<T>(ptr: *mut T, count: uint) -> *mut T {
49
49
50
50
#[ doc = "Create an unsafe null pointer" ]
51
51
#[ inline( always) ]
52
- fn null < T > ( ) -> * T unsafe { ret unsafe:: reinterpret_cast ( 0 u ) ; }
52
+ pure fn null < T > ( ) -> * T unsafe { ret unsafe:: reinterpret_cast ( 0 u ) ; }
53
+
54
+ #[ doc = "Returns true if the pointer is equal to the null pointer" ]
55
+ pure fn is_null < T > ( ptr : * const T ) -> bool { ptr == null ( ) }
56
+
57
+ #[ doc = "Returns true if the pointer is not equal to the null pointer" ]
58
+ pure fn is_not_null < T > ( ptr : * const T ) -> bool { !is_null ( ptr) }
53
59
54
60
#[ doc = "
55
61
Copies data from one location to another
You can’t perform that action at this time.
0 commit comments