@@ -74,27 +74,18 @@ static void* dll_lookup(const char* name, const char* path, bool vm_exit_on_fail
74
74
return func;
75
75
}
76
76
77
- static void store_function_pointers (bool is_static, const char * path, bool vm_exit_on_failure) {
77
+ static void store_function_pointers (const char * path, bool vm_exit_on_failure) {
78
78
assert (_zip_handle != nullptr , " invariant" );
79
- if (!is_static) {
80
- ZIP_Open = CAST_TO_FN_PTR (ZIP_Open_t, dll_lookup (" ZIP_Open" , path, vm_exit_on_failure));
81
- ZIP_Close = CAST_TO_FN_PTR (ZIP_Close_t, dll_lookup (" ZIP_Close" , path, vm_exit_on_failure));
82
- ZIP_FindEntry = CAST_TO_FN_PTR (ZIP_FindEntry_t, dll_lookup (" ZIP_FindEntry" , path, vm_exit_on_failure));
83
- ZIP_ReadEntry = CAST_TO_FN_PTR (ZIP_ReadEntry_t, dll_lookup (" ZIP_ReadEntry" , path, vm_exit_on_failure));
84
- ZIP_CRC32 = CAST_TO_FN_PTR (ZIP_CRC32_t, dll_lookup (" ZIP_CRC32" , path, vm_exit_on_failure));
85
- // The following entry points are most likely optional from a zip library implementation perspective.
86
- // Hence no vm_exit on a resolution failure. Further refactorings should investigate this,
87
- // and if possible, streamline setting all entry points consistently.
88
- ZIP_GZip_InitParams = CAST_TO_FN_PTR (ZIP_GZip_InitParams_t, dll_lookup (" ZIP_GZip_InitParams" , path, false ));
89
- ZIP_GZip_Fully = CAST_TO_FN_PTR (ZIP_GZip_Fully_t, dll_lookup (" ZIP_GZip_Fully" , path, false ));
90
- } else {
91
- ZIP_Open = CAST_TO_FN_PTR (ZIP_Open_t, os::lookup_function (" ZIP_Open" ));
92
- ZIP_Close = CAST_TO_FN_PTR (ZIP_Close_t, os::lookup_function (" ZIP_Close" ));
93
- ZIP_FindEntry = CAST_TO_FN_PTR (ZIP_FindEntry_t, os::lookup_function (" ZIP_FindEntry" ));
94
- ZIP_ReadEntry = CAST_TO_FN_PTR (ZIP_ReadEntry_t, os::lookup_function (" ZIP_ReadEntry" ));
95
- ZIP_CRC32 = CAST_TO_FN_PTR (ZIP_CRC32_t, os::lookup_function (" ZIP_CRC32" ));
96
- ZIP_GZip_InitParams = CAST_TO_FN_PTR (ZIP_GZip_InitParams_t, os::lookup_function (" ZIP_GZip_InitParams" )); ZIP_GZip_Fully = CAST_TO_FN_PTR (ZIP_GZip_Fully_t, os::lookup_function (" ZIP_GZip_Fully" ));
97
- }
79
+ ZIP_Open = CAST_TO_FN_PTR (ZIP_Open_t, dll_lookup (" ZIP_Open" , path, vm_exit_on_failure));
80
+ ZIP_Close = CAST_TO_FN_PTR (ZIP_Close_t, dll_lookup (" ZIP_Close" , path, vm_exit_on_failure));
81
+ ZIP_FindEntry = CAST_TO_FN_PTR (ZIP_FindEntry_t, dll_lookup (" ZIP_FindEntry" , path, vm_exit_on_failure));
82
+ ZIP_ReadEntry = CAST_TO_FN_PTR (ZIP_ReadEntry_t, dll_lookup (" ZIP_ReadEntry" , path, vm_exit_on_failure));
83
+ ZIP_CRC32 = CAST_TO_FN_PTR (ZIP_CRC32_t, dll_lookup (" ZIP_CRC32" , path, vm_exit_on_failure));
84
+ // The following entry points are most likely optional from a zip library implementation perspective.
85
+ // Hence no vm_exit on a resolution failure. Further refactorings should investigate this,
86
+ // and if possible, streamline setting all entry points consistently.
87
+ ZIP_GZip_InitParams = CAST_TO_FN_PTR (ZIP_GZip_InitParams_t, dll_lookup (" ZIP_GZip_InitParams" , path, false ));
88
+ ZIP_GZip_Fully = CAST_TO_FN_PTR (ZIP_GZip_Fully_t, dll_lookup (" ZIP_GZip_Fully" , path, false ));
98
89
}
99
90
100
91
static void load_zip_library (bool vm_exit_on_failure) {
0 commit comments