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 intptr_t instead of ssize_t; diplomat-tool 0.5.2 #327

Merged
merged 2 commits into from
Apr 28, 2023
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
145 changes: 85 additions & 60 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ crate-type = ["staticlib", "rlib", "cdylib"]
[dependencies]
diplomat = { path = "../macro" }
diplomat-runtime = { path = "../runtime" }
icu = "1.0.0"
writeable = "0.5.0"
fixed_decimal = "0.5.1"
icu_provider = { version = "1.0", features = ["serde"] }
icu_testdata = { version = "1.0" }
icu = "1.2"
writeable = "0.5.2"
fixed_decimal = "0.5.3"
icu_provider = { version = "1.2", features = ["serde"] }
icu_testdata = { version = "1.2" }
2 changes: 1 addition & 1 deletion example/c/include/diplomat_runtime.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/c2/include/diplomat_runtime.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/cpp/include/diplomat_runtime.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/cpp2/include/diplomat_runtime.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion feature_tests/c/include/diplomat_runtime.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion feature_tests/c2/include/diplomat_runtime.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion feature_tests/cpp/include/diplomat_runtime.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion feature_tests/cpp2/include/diplomat_runtime.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tool/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "diplomat-tool"
description = "Tool for generating FFI bindings for various languages"
version = "0.5.1"
version = "0.5.2"
authors = [
"Shadaj Laddad <shadaj@users.noreply.github.com>",
"Manish Goregaokar <manishsmail@gmail.com>",
Expand Down
2 changes: 1 addition & 1 deletion tool/src/c/runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ MAKE_SLICE_VIEW(I32, int32_t)
MAKE_SLICE_VIEW(U32, uint32_t)
MAKE_SLICE_VIEW(I64, int64_t)
MAKE_SLICE_VIEW(U64, uint64_t)
MAKE_SLICE_VIEW(Isize, ssize_t)
MAKE_SLICE_VIEW(Isize, intptr_t)
MAKE_SLICE_VIEW(Usize, size_t)
MAKE_SLICE_VIEW(F32, float)
MAKE_SLICE_VIEW(F64, double)
Expand Down
2 changes: 1 addition & 1 deletion tool/src/c/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pub fn c_type_for_prim(prim: &PrimitiveType) -> &'static str {
PrimitiveType::u64 => "uint64_t",
PrimitiveType::i128 => panic!("i128 not supported in C"),
PrimitiveType::u128 => panic!("u128 not supported in C"),
PrimitiveType::isize => "ssize_t",
PrimitiveType::isize => "intptr_t",
PrimitiveType::usize => "size_t",
PrimitiveType::f32 => "float",
PrimitiveType::f64 => "double",
Expand Down
2 changes: 1 addition & 1 deletion tool/src/c2/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl<'tcx> CFormatter<'tcx> {
PrimitiveType::Int(IntType::I64) => "int64_t",
PrimitiveType::Int(IntType::U64) => "uint64_t",
PrimitiveType::Int128(_) => panic!("i128 not supported in C"),
PrimitiveType::IntSize(IntSizeType::Isize) => "ssize_t",
PrimitiveType::IntSize(IntSizeType::Isize) => "intptr_t",
PrimitiveType::IntSize(IntSizeType::Usize) => "size_t",
PrimitiveType::Float(FloatType::F32) => "float",
PrimitiveType::Float(FloatType::F64) => "double",
Expand Down