Skip to content

Commit 276c604

Browse files
xaionaro@dx.centerxaionaro@dx.center
authored andcommitted
fix: nil-safe handle params and remove redundant int32() casts
Two systemic generated-code fixes: 1. Nil-safe handle access: generated methods now use .cptr() instead of .ptr for pointer handle params. The cptr() method returns nil when the receiver is nil, preventing SIGSEGV when passing nil optional params (e.g. nil surface/crypto in AMediaCodec_configure). 2. Generic result(): changed from result(int32) to result[T ~int32|~uint32] so capi return types are accepted directly without redundant int32() cast. Also fixes media codec-lifecycle and decoder-setup examples to skip Configure/Start when running outside an Activity context (C-level crash).
1 parent d8fca29 commit 276c604

160 files changed

Lines changed: 1440 additions & 324 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

activity/activity.go

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

activity/errors.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

activity/native_activity_callbacks.go

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

asset/asset.go

Lines changed: 12 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

asset/dir.go

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

asset/errors.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

asset/manager.go

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

audio/errors.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

audio/stream.go

Lines changed: 21 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

audio/stream_builder.go

Lines changed: 12 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)