Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use c_char instead of i8 where necessary #347

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/src/graphics/base.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Common state shared throughout the graphics system

use std::ffi::CStr;
use std::ffi::{c_char, CStr};
use std::path::PathBuf;
use std::sync::Arc;
use std::{fs, io, ptr};
Expand Down Expand Up @@ -111,7 +111,7 @@ impl Base {
.device_name
.iter()
.position(|&x| x == 0)
.unwrap()] as *const [i8] as *const [u8]),
.unwrap()] as *const [c_char] as *const [u8]),
)
.unwrap();
info!(name, "selected device");
Expand Down
3 changes: 2 additions & 1 deletion client/src/graphics/voxels/surface_extraction.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use std::ffi::c_char;
use std::{mem, ptr};

use ash::{vk, Device};
Expand Down Expand Up @@ -109,7 +110,7 @@ impl SurfaceExtraction {
.map_entries(&specialization_map_entries)
.data(as_bytes(&WORKGROUP_SIZE));

let p_name = b"main\0".as_ptr() as *const i8;
let p_name = b"main\0".as_ptr() as *const c_char;
let mut pipelines = device
.create_compute_pipelines(
gfx.pipeline_cache,
Expand Down
Loading