Commit 276c604
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
- activity
- asset
- audio
- binder
- bitmap
- camera
- choreographer
- config
- egl
- examples/media
- codec-lifecycle
- decoder-setup
- font
- hint
- hwbuf
- image
- input
- looper
- media
- midi
- nnapi
- persistablebundle
- sensor
- storage
- surfacecontrol
- surfacetexture
- templates
- thermal
- tools/pkg/idiomgen
- window
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments