Skip to content

fix: handle nothing flags in writeStream to prevent unsafe_convert error#111

Open
zsoerenm wants to merge 1 commit intomainfrom
ss/fix-writestream-error-pointer
Open

fix: handle nothing flags in writeStream to prevent unsafe_convert error#111
zsoerenm wants to merge 1 commit intomainfrom
ss/fix-writestream-error-pointer

Conversation

@zsoerenm
Copy link
Copy Markdown
Collaborator

When flags parameter is nothing (the default), passing it directly to SoapySDRDevice_writeStream causes MethodError: no method matching unsafe_convert(::Type{Ptr{Int32}}, ::Nothing).

Fix by using out_flags as the pointer when flags is nothing, mirroring the pattern used in readStream.

🤖 Generated with Claude Code

When flags parameter is nothing (the default), passing it directly to
SoapySDRDevice_writeStream causes MethodError: no method matching
unsafe_convert(::Type{Ptr{Int32}}, ::Nothing).

Fix by using out_flags as the pointer when flags is nothing,
mirroring the pattern used in readStream.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@zsoerenm zsoerenm requested a review from maleadt November 28, 2025 21:15
@zsoerenm zsoerenm self-assigned this Nov 28, 2025
@maleadt
Copy link
Copy Markdown
Member

maleadt commented Dec 4, 2025

Why not have the flags argument of the function default to Ref{Cint}(0)?

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.

2 participants