Skip to content

Commit

Permalink
Remove conditional compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHecart committed Aug 30, 2023
1 parent e5bd8fd commit 893f89b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all --examples -- -D warnings
args: --all --examples --features=logger-autoinit --features=shared-memory -- -D warnings

- name: Run rustfmt
uses: actions-rs/cargo@v1
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --release
args: --verbose --release --features=logger-autoinit --features=shared-memory

- name: Upload artifact
uses: actions/upload-artifact@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
args: --features=logger-autoinit --features=shared-memory -- -D warnings
- name: Environment setup
id: env
shell: bash
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
with:
use-cross: ${{ matrix.job.use-cross }}
command: build
args: --release --target=${{ matrix.job.target }}
args: --release --target=${{ matrix.job.target }} --features=logger-autoinit --features=shared-memory

- name: Debian package - libzenohc
if: contains(matrix.job.target, '-linux-gnu')
Expand Down
6 changes: 0 additions & 6 deletions include/zenoh_commons.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,6 @@ typedef struct z_owned_closure_query_t {
* To check if `val` is still valid, you may use `z_X_check(&val)` (or `z_check(val)` if your compiler supports `_Generic`), which will return `true` if `val` is valid.
*/
#if defined(TARGET_ARCH_X86_64)
typedef struct ALIGN(8) z_owned_reply_t {
uint64_t _0[22];
} z_owned_reply_t;
#endif
#if defined(TARGET_ARCH_X86_64)
typedef struct ALIGN(8) z_owned_reply_t {
uint64_t _0[23];
} z_owned_reply_t;
Expand Down Expand Up @@ -667,7 +662,6 @@ typedef struct z_subscriber_t {
*/
typedef struct zc_owned_payload_t {
struct z_bytes_t payload;
uintptr_t _owner[4];
uintptr_t _owner[5];
} zc_owned_payload_t;
typedef struct zc_owned_shmbuf_t {
Expand Down
6 changes: 0 additions & 6 deletions src/commons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ impl From<Option<&Timestamp>> for z_timestamp_t {
#[repr(C)]
pub struct zc_owned_payload_t {
pub payload: z_bytes_t,
#[cfg(not(feature = "shared-memory"))]
pub _owner: [usize; 4],
#[cfg(feature = "shared-memory")]
pub _owner: [usize; 5],
}
impl Default for zc_owned_payload_t {
Expand Down Expand Up @@ -179,9 +176,6 @@ pub extern "C" fn zc_payload_null() -> zc_owned_payload_t {
len: 0,
start: std::ptr::null(),
},
#[cfg(not(feature = "shared-memory"))]
_owner: [0; 4],
#[cfg(feature = "shared-memory")]
_owner: [0; 5],
}
}
Expand Down
5 changes: 1 addition & 4 deletions src/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ type ReplyInner = Option<Reply>;
/// After a move, `val` will still exist, but will no longer be valid. The destructors are double-drop-safe, but other functions will still trust that your `val` is valid.
///
/// To check if `val` is still valid, you may use `z_X_check(&val)` (or `z_check(val)` if your compiler supports `_Generic`), which will return `true` if `val` is valid.
#[cfg(all(target_arch = "x86_64", not(feature = "shared-memory")))]
#[repr(C, align(8))]
pub struct z_owned_reply_t([u64; 22]);
#[cfg(all(target_arch = "x86_64", feature = "shared-memory"))]
#[cfg(target_arch = "x86_64")]
#[repr(C, align(8))]
pub struct z_owned_reply_t([u64; 23]);

Expand Down

0 comments on commit 893f89b

Please sign in to comment.