Skip to content

Fix Windows build: Cast glong/gulong types in element property introspection - #6

Merged
srperens merged 1 commit into
mainfrom
fix/windows-type-mismatches
Nov 20, 2025
Merged

Fix Windows build: Cast glong/gulong types in element property introspection#6
srperens merged 1 commit into
mainfrom
fix/windows-type-mismatches

Conversation

@srperens

Copy link
Copy Markdown
Collaborator

Summary

  • Fix Windows build type mismatches in element property introspection
  • Add explicit casts for glong/gulong to i64/u64
  • Resolves 4 compilation errors on Windows platform

Problem

The Windows build was failing with 4 type mismatch errors in backend/src/gst/discovery.rs:

  • Lines 1133:50 and 1133:55 - glong (i32 on Windows, i64 on Linux)
  • Lines 1161:51 and 1161:56 - gulong (u32 on Windows, u64 on Linux)

These errors occurred in the introspect_element_properties_lazy() function when handling ParamSpecLong and ParamSpecULong property types.

Solution

Added explicit type casts with as i64 and as u64 for cross-platform compatibility:

  • Cast param_spec.minimum() and param_spec.maximum() for ParamSpecLong
  • Cast param_spec.minimum() and param_spec.maximum() for ParamSpecULong
  • Added #[allow(clippy::unnecessary_cast)] annotations to suppress warnings on Linux

This matches the fix that was already applied to the pad property introspection code in the same file.

Testing

  • Pre-commit checks pass (formatting + clippy)
  • CI will verify Windows, Linux, and macOS builds

🤖 Generated with Claude Code

…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>
@srperens
srperens merged commit 240c0af into main Nov 20, 2025
8 checks passed
@srperens
srperens deleted the fix/windows-type-mismatches branch November 20, 2025 12:46
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
srperens pushed a commit that referenced this pull request Mar 5, 2026
Bumps aws-lc-rs 1.16.0 -> 1.16.1 and aws-lc-sys 0.37.1 -> 0.38.0,
resolving Dependabot alerts #4, #5, and #6 (PKCS7_verify bypass and
AES-CCM timing side-channel).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant