浏览代码

Use libc::c_void for the opaque struct

We can use this because we don't ever want to access it.
Lucas Stadler 10 年之前
父节点
当前提交
e5ac979f6a
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      rust/coffi/src/main.rs

+ 1 - 4
rust/coffi/src/main.rs

@ -6,12 +6,9 @@ extern {
6 6
    fn cos(d: f64) -> f64;
7 7
}
8 8
9
#[allow(non_camel_case_types)]
10
enum png_opaque {}
11
12 9
#[repr(C)]
13 10
struct png_image {
14
    opaque: *mut png_opaque,
11
    opaque: *mut libc::c_void,
15 12
    version: libc::uint32_t,
16 13
    width: libc::uint32_t,
17 14
    height: libc::uint32_t,