Fix Windows build: Cast glong/gulong types in element property introspection - #6
Merged
Merged
Conversation
…ntrospection On Windows, glong is i32 and gulong is u32, but on Linux they are i64 and u64. This caused type mismatches when building on Windows. Changes: - Add explicit casts with `as i64` and `as u64` in introspect_element_properties_lazy() - Add #[allow(clippy::unnecessary_cast)] annotations for cross-platform compatibility - Matches the fix already applied to pad property introspection code Fixes 4 compilation errors on Windows: - backend/src/gst/discovery.rs:1133:50 (glong min) - backend/src/gst/discovery.rs:1133:55 (glong max) - backend/src/gst/discovery.rs:1161:51 (gulong min) - backend/src/gst/discovery.rs:1161:56 (gulong max) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
birme
pushed a commit
to eyevinn-osaas/strom
that referenced
this pull request
Feb 2, 2026
Fix Windows build: Cast glong/gulong types in element property introspection
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Problem
The Windows build was failing with 4 type mismatch errors in
backend/src/gst/discovery.rs:glong(i32 on Windows, i64 on Linux)gulong(u32 on Windows, u64 on Linux)These errors occurred in the
introspect_element_properties_lazy()function when handlingParamSpecLongandParamSpecULongproperty types.Solution
Added explicit type casts with
as i64andas u64for cross-platform compatibility:param_spec.minimum()andparam_spec.maximum()forParamSpecLongparam_spec.minimum()andparam_spec.maximum()forParamSpecULong#[allow(clippy::unnecessary_cast)]annotations to suppress warnings on LinuxThis matches the fix that was already applied to the pad property introspection code in the same file.
Testing
🤖 Generated with Claude Code