Repository navigation
Commit d4c642b
Use weak symbol for haskellUseScrollDemo in jni_bridge.c
The useScrollDemo JNI method was added as test infrastructure for
the ScrollView integration tests. It calls haskellUseScrollDemo(),
which was declared extern — forcing every app using haskell-mobile
as a library to export that symbol from Haskell.
Apps that replace HaskellMobile/App.hs (via extraModuleCopy) and
don't provide a scroll demo would get an UnsatisfiedLinkError at
startup when Android's linker tried to load libprrrrrrrrr.so.
Fix: define haskellUseScrollDemo with __attribute__((weak)) so it
acts as a no-op fallback. Apps that do want scroll-demo behaviour
can override it with a 'foreign export ccall haskellUseScrollDemo'
in their Haskell source; apps that don't need it link cleanly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 0dd6fa8 commit d4c642b
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| |||
0 commit comments