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 766be96 commit 325eeaaCopy full SHA for 325eeaa
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: 9fa44a41e67151c5c392e2bd2b3989d74703efec
+refs/heads/master: 12a67af81df4f05d9bc9f6634f615a69098f1d04
trunk/src/test/run-pass/bind-native-printf.rs
@@ -0,0 +1,16 @@
+// From #1174:
+
3
+use std;
4
5
+#[link_name = ""]
6
+native mod libc {
7
+ fn printf(s: *u8, a: int); /* A tenuous definition. */
8
+}
9
10
+fn main() {
11
+ let b = std::str::bytes("%d\n");
12
+ let b8 = unsafe { std::vec::unsafe::to_ptr(b) };
13
+ libc::printf(b8, 4);
14
+ let a = bind libc::printf(b8, 5);
15
+ a(); /* core dump */
16
0 commit comments