Skip to content

Commit 62c89b0

Browse files
authored
replace i8 with c_char (#84)
1 parent 2f7bb7e commit 62c89b0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/context/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use std::ffi::CString;
2-
use std::os::raw::{c_int, c_long};
2+
use std::os::raw::{c_char, c_int, c_long};
33
use std::ptr;
44

55
use crate::key::{RedisKey, RedisKeyWritable};
@@ -94,7 +94,7 @@ impl Context {
9494
self.ctx,
9595
cmd.as_ptr(),
9696
raw::FMT,
97-
inner_args.as_ptr() as *mut i8,
97+
inner_args.as_ptr() as *mut c_char,
9898
terminated_args.len(),
9999
)
100100
};

src/raw.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ extern "C" {
148148

149149
///////////////////////////////////////////////////////////////
150150

151-
pub const FMT: *const i8 = b"v\0".as_ptr() as *const i8;
151+
pub const FMT: *const c_char = b"v\0".as_ptr() as *const c_char;
152152

153153
// Helper functions for the raw bindings.
154154

@@ -318,7 +318,7 @@ pub fn replicate(ctx: *mut RedisModuleCtx, command: &str, args: &[&str]) -> Stat
318318
ctx,
319319
cmd.as_ptr(),
320320
FMT,
321-
inner_args.as_ptr() as *mut i8,
321+
inner_args.as_ptr() as *mut c_char,
322322
terminated_args.len(),
323323
)
324324
.into()
@@ -359,6 +359,6 @@ pub fn string_append_buffer(
359359
buff: &str,
360360
) -> Status {
361361
unsafe {
362-
RedisModule_StringAppendBuffer.unwrap()(ctx, s, buff.as_ptr() as *mut i8, buff.len()).into()
362+
RedisModule_StringAppendBuffer.unwrap()(ctx, s, buff.as_ptr() as *mut c_char, buff.len()).into()
363363
}
364364
}

0 commit comments

Comments
 (0)