Skip to content

Commit

Permalink
Update flatbuffers
Browse files Browse the repository at this point in the history
  • Loading branch information
VirxEC committed Jan 1, 2025
1 parent d3cc7e8 commit 7fc16ba
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
24 changes: 12 additions & 12 deletions Cargo.lock

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

9 changes: 4 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rlbot-flatbuffers-py"
version = "0.11.6"
name = "rlbot_flatbuffers"
version = "0.11.7"
edition = "2021"
description = "A Python module implemented in Rust for serializing and deserializing RLBot's flatbuffers"
repository = "https://github.com/VirxEC/rlbot_flatbuffers_py"
Expand All @@ -15,13 +15,12 @@ all = "warn"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "rlbot_flatbuffers"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.23.0", features = [] }
serde = "1.0.197"
flatbuffers = "=24.3.25"
serde = "1.0.217"
flatbuffers = "=24.12.23"
# get-size appears to be unmaintained but it's too useful here
# forked and updated deps
get-size = { git = "https://github.com/VirxEC/get-size", branch = "update", features = ["derive"] }
Expand Down
8 changes: 5 additions & 3 deletions codegen/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ impl StructBindGenerator {
types: Vec<CustomType>,
) -> Option<Self> {
let is_frozen = PythonBindType::FROZEN_TYPES.contains(&struct_name.as_str());
let frozen_needs_py = is_frozen && PythonBindType::FROZEN_NEEDS_PY.contains(&struct_name.as_str());
let is_semi_frozen = !is_frozen && PythonBindType::SEMI_FROZEN_TYPES.contains(&struct_name.as_str());
let frozen_needs_py =
is_frozen && PythonBindType::FROZEN_NEEDS_PY.contains(&struct_name.as_str());
let is_semi_frozen =
!is_frozen && PythonBindType::SEMI_FROZEN_TYPES.contains(&struct_name.as_str());

let is_all_base_types = types
.iter()
Expand Down Expand Up @@ -730,7 +732,7 @@ impl Generator for StructBindGenerator {
if self.is_frozen {
"#[pyclass(module = \"rlbot_flatbuffers\", subclass, get_all, frozen)]"
} else if self.is_semi_frozen {
"#[pyclass(module = \"rlbot_flatbuffers\", subclass, get_all)]"
"#[pyclass(module = \"rlbot_flatbuffers\", subclass, get_all)]"
} else if self.types.is_empty() {
"#[pyclass(module = \"rlbot_flatbuffers\", subclass, frozen)]"
} else {
Expand Down
2 changes: 1 addition & 1 deletion flatbuffers-schema

0 comments on commit 7fc16ba

Please sign in to comment.