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.
1 parent c89358b commit 1274b60Copy full SHA for 1274b60
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: 020d8f12a0993ddf0cd03862075b23d54a578142
+refs/heads/master: 9aa6e5750ef31d5ccc2c7edd184aaa3f7372ea00
trunk/src/lib/ptr.rs
@@ -34,6 +34,16 @@ fn offset<T>(ptr: *T, count: uint) -> *T {
34
ret rusti::ptr_offset(ptr, count);
35
}
36
37
+/*
38
+Function: mut_offset
39
+
40
+Calculate the offset from a mutable pointer
41
+*/
42
+fn mut_offset<T>(ptr: *mutable T, count: uint) -> *mutable T {
43
+ ret rusti::ptr_offset(ptr as *T, count) as *mutable T;
44
+}
45
46
47
/*
48
Function: null
49
0 commit comments