Skip to content
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
4 changes: 3 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
feature_flags: [byond-515-1621, byond-516-1651]
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
target_name: i686-unknown-linux-gnu
Expand Down Expand Up @@ -39,7 +41,7 @@ jobs:
with:
toolchain: stable
command: check
args: --target ${{ matrix.target_name }}
args: --target ${{ matrix.target_name }} --no-default-features --features ${{ matrix.feature_flags }}

check_fmt:
name: Check format
Expand Down
7 changes: 6 additions & 1 deletion crates/byondapi-rs-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ edition = "2021"
crate-type = ["cdylib"]

[dependencies]
byondapi = { path = "../byondapi-rs" }
byondapi = { path = "../byondapi-rs", default-features = false }
tempfile = "3.17.1"
cargo_metadata = "0.19.1"
eyre = "0.6.12"

[features]
default = ["byond-516-1651"]
byond-515-1621 = ["byondapi/byond-515-1621",]
byond-516-1651 = ["byondapi/byond-516-1651"]
2 changes: 2 additions & 0 deletions crates/byondapi-rs/src/value/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ impl ByondValue {

/// Replaces whatever is currently in this value with a string that's pointed to by the stringid
/// # DO NOT PASS STRINGIDS THAT ARE NOT RETURNED BY [`crate::byond_string::str_id_of`]
#[cfg(feature = "byond-516-1651")]
pub fn set_strid(&mut self, strid: u4c) {
unsafe { byond().ByondValue_SetStrId(&mut self.0, strid) }
}
Expand Down Expand Up @@ -249,6 +250,7 @@ impl ByondValue {
unsafe { byond().ByondValue_DecRef(&self.0) }
}

#[cfg(feature = "byond-516-1651")]
pub fn decrement_tempref(&mut self) {
unsafe { byond().ByondValue_DecTempRef(&self.0) }
}
Expand Down