Skip to content

Commit ada55cf

Browse files
Fix 515.1621 (#12)
* Fix 515.1621 * Lets try matrix this * Oh god I bought actions debugging to byondapi
1 parent 8d16ff9 commit ada55cf

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

.github/workflows/check.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15+
feature_flags: [byond-515-1621, byond-516-1651]
16+
os: [ubuntu-latest, windows-latest]
1517
include:
1618
- os: ubuntu-latest
1719
target_name: i686-unknown-linux-gnu
@@ -39,7 +41,7 @@ jobs:
3941
with:
4042
toolchain: stable
4143
command: check
42-
args: --target ${{ matrix.target_name }}
44+
args: --target ${{ matrix.target_name }} --no-default-features --features ${{ matrix.feature_flags }}
4345

4446
check_fmt:
4547
name: Check format

crates/byondapi-rs-test/Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ edition = "2021"
99
crate-type = ["cdylib"]
1010

1111
[dependencies]
12-
byondapi = { path = "../byondapi-rs" }
12+
byondapi = { path = "../byondapi-rs", default-features = false }
1313
tempfile = "3.17.1"
1414
cargo_metadata = "0.19.1"
1515
eyre = "0.6.12"
16+
17+
[features]
18+
default = ["byond-516-1651"]
19+
byond-515-1621 = ["byondapi/byond-515-1621",]
20+
byond-516-1651 = ["byondapi/byond-516-1651"]

crates/byondapi-rs/src/value/functions.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ impl ByondValue {
117117

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

253+
#[cfg(feature = "byond-516-1651")]
252254
pub fn decrement_tempref(&mut self) {
253255
unsafe { byond().ByondValue_DecTempRef(&self.0) }
254256
}

0 commit comments

Comments
 (0)