Skip to content
This repository was archived by the owner on Jul 11, 2021. It is now read-only.

Commit faef833

Browse files
author
Simone Mosciatti
committed
make it multiplatform
1 parent 1ee9152 commit faef833

5 files changed

Lines changed: 21 additions & 10 deletions

File tree

Cargo.lock

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ uuid = { version = "0.4", features = ["v4"] }
1313
log = {version = "0.3.8", features = ["release_max_level_warn"]}
1414
env_logger = "0.4.3"
1515
redisql_lib = {path = "./redisql_lib"}
16-
# engine_pro = {path = "./engine_pro", optional = true}
16+
engine_pro = {path = "./engine_pro", optional = true}
1717

1818
[features]
1919
default = []
20-
21-
# pro = ["engine_pro"]
20+
pro = ["engine_pro"]
21+
trial = ["engine_pro/trial"]

redisql_lib/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ fn main() {
4949
}
5050
}
5151

52-
// let engine_pro = "-DENGINE_PRO=1";
53-
let engine_pro = "-DENGINE_PRO=0";
52+
let engine_pro = "-DENGINE_PRO=1";
53+
// let engine_pro = "-DENGINE_PRO=0";
5454

5555
let bindings =
5656
bindgen::Builder::default()

redisql_lib/src/redis.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::string;
66
use std::fs::File;
77
use std::io::BufReader;
88

9-
use std::os::raw::c_long;
9+
use std::os::raw::{c_long, c_char};
1010

1111
use std::io::{Read, Write};
1212

@@ -297,7 +297,7 @@ fn reply_with_simple_string(ctx: *mut rm::ffi::RedisModuleCtx,
297297
-> i32 {
298298
unsafe {
299299
rm::ffi::RedisModule_ReplyWithSimpleString
300-
.unwrap()(ctx, s.as_ptr() as *const i8)
300+
.unwrap()(ctx, s.as_ptr() as *const c_char)
301301
}
302302
}
303303

redisql_lib/src/redis_type.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub fn ReplyWithError(ctx: Context, error: &str) -> i32 {
114114
unsafe {
115115
ffi::RedisModule_ReplyWithError.unwrap()(ctx.as_ptr(),
116116
error.as_ptr() as
117-
*const i8)
117+
*const c_char)
118118
}
119119
}
120120

@@ -208,8 +208,10 @@ pub unsafe fn EmitAOF(aof: &AOF,
208208
key: *mut ffi::RedisModuleString,
209209
data: &str) {
210210
ffi::RedisModule_EmitAOF.unwrap()(aof.as_ptr(),
211-
command.as_ptr() as *const i8,
212-
specifier.as_ptr() as *const i8,
211+
command.as_ptr() as
212+
*const c_char,
213+
specifier.as_ptr() as
214+
*const c_char,
213215
key,
214216
data.as_ptr())
215217
}

0 commit comments

Comments
 (0)