Commit a9cacd3
fix: use unsafeBitCast for thisObj in @JavaImplementation macro
In C++ interop mode, jobject is UnsafeMutablePointer<_jobject>, but
the swift-java library (compiled without C++ interop) expects jobject
as OpaquePointer. Use unsafeBitCast to ensure compatibility in both
modes since both have the same memory representation (a pointer).
This fixes the "cannot convert value of type 'jobject' to expected
argument type 'OpaquePointer'" error when building sample apps with
C++ interoperability enabled.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 9cd3191 commit a9cacd3
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
131 | 136 | | |
132 | | - | |
| 137 | + | |
133 | 138 | | |
134 | 139 | | |
135 | 140 | | |
| |||
0 commit comments