Skip to content

Commit 2b67fee

Browse files
author
Joshua Nelson
committed
Fix support for 32-bit targets
This was broken by https://gitlab.com/YottaDB/Lang/YDBRust/-/merge_requests/74.
1 parent a7e8d57 commit 2b67fee

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/simple_api/call_in.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,12 @@ impl CallInDescriptor {
183183
/// Create a new `descriptor` that will call `routine`.
184184
pub fn new(routine: CString) -> Self {
185185
use crate::craw::ydb_string_t;
186+
use std::os::raw::c_ulong;
186187

187-
let string =
188-
ydb_string_t { length: routine.as_bytes().len() as u64, address: routine.into_raw() };
188+
let string = ydb_string_t {
189+
length: routine.as_bytes().len() as c_ulong,
190+
address: routine.into_raw(),
191+
};
189192
Self(ci_name_descriptor { rtn_name: string, handle: std::ptr::null_mut() })
190193
}
191194
/// Consume this descriptor and return the original routine

src/simple_api/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,6 +1822,7 @@ pub fn lock_st(
18221822
}
18231823
#[cfg(target_pointer_width = "32")]
18241824
{
1825+
let tptoken = tptoken.0;
18251826
#[cfg(target_endian = "little")]
18261827
{
18271828
arg[0] = (tptoken & 0xffffffff) as Void;

0 commit comments

Comments
 (0)