Native Libraries:

- made C methods `static` (similar to `private` in Java) to avoid that they are added (exported) to shared library symbol table
- macOS and Linux: added `-fvisibility=hidden` to compiler options to mark C methods hidden by default
This commit is contained in:
Karl Tauber
2025-01-07 19:49:04 +01:00
parent d7462bd424
commit 251198c66d
10 changed files with 72 additions and 32 deletions

View File

@@ -126,10 +126,10 @@
#define isOptionClear( option ) ((optionsClear & com_formdev_flatlaf_ui_FlatNativeMacLibrary_ ## option) != 0)
#define isOptionSetOrClear( option ) isOptionSet( option ) || isOptionClear( option )
// declare methods
NSWindow* getNSWindow( JNIEnv* env, jclass cls, jobject window );
// declare external methods
extern NSWindow* getNSWindow( JNIEnv* env, jclass cls, jobject window );
jobjectArray newJavaStringArray( JNIEnv* env, jsize count ) {
static jobjectArray newJavaStringArray( JNIEnv* env, jsize count ) {
jclass stringClass = env->FindClass( "java/lang/String" );
return env->NewObjectArray( count, stringClass, NULL );
}