@@ -152,20 +152,20 @@ def generate_function_pointers(dll_file_path, header_file_path, output_h_path, o
152
152
f .write ("\n \n " )
153
153
f .write ("\n " .join (macro_definitions ))
154
154
f .write ("\n // clang-format on\n " )
155
- f .write ("\n \n // --- Dynamic Loader Declaration for Windows ---\n " )
155
+ f .write ("\n // --- Dynamic Loader Declaration for Windows ---\n " )
156
156
f .write ("#if defined(_WIN32)\n " )
157
- f .write ('#include <windows.h> // For HMODULE \n ' )
157
+ f .write ('#include <windows.h>\n ' )
158
158
f .write (f'\n // Google Analytics Windows DLL SHA256 hash, to be verified on load.' )
159
159
f .write (f'\n extern const unsigned char FirebaseAnalytics_WindowsDllHash[{ len (dll_hash )} ];\n ' );
160
160
161
161
f .write (f'\n // Number of Google Analytics functions expected to be loaded from the DLL.' )
162
162
f .write (f'\n #define FIREBASE_ANALYTICS_DYNAMIC_FUNCTION_COUNT { len (function_details_for_loader )} \n \n ' )
163
- f .write ('// Load Google Analytics functions from the given DLL handle into function pointers.\n ' )
164
- f .write (f'// Returns the number of functions successfully loaded (out of FIREBASE_ANALYTICS_DYNAMIC_FUNCTION_COUNT ).\n ' )
163
+ f .write ('// Load Analytics functions from the given DLL handle into function pointers.\n ' )
164
+ f .write (f'// Returns the number of functions successfully loaded (out of\n FIREBASE_ANALYTICS_DYNAMIC_FUNCTION_COUNT ).\n ' )
165
165
f .write ("int FirebaseAnalytics_LoadDynamicFunctions(HMODULE dll_handle);\n \n " )
166
166
f .write ('// Reset all function pointers back to stubs.\n ' )
167
167
f .write ("void FirebaseAnalytics_UnloadDynamicFunctions(void);\n \n " )
168
- f .write ("#endif // defined(_WIN32)\n " )
168
+ f .write ("#endif // defined(_WIN32)\n " )
169
169
f .write ("\n #ifdef __cplusplus\n " )
170
170
f .write ("}\n " )
171
171
f .write ("#endif\n \n " )
@@ -177,14 +177,14 @@ def generate_function_pointers(dll_file_path, header_file_path, output_h_path, o
177
177
with open (output_c_path , 'w' , encoding = 'utf-8' ) as f :
178
178
f .write (f"{ COPYRIGHT_NOTICE } " )
179
179
f .write (f"// Generated from { os .path .basename (header_file_path )} by { os .path .basename (sys .argv [0 ])} \n \n " )
180
- f .write (f'#include "{ INCLUDE_PREFIX } { os .path .basename (output_h_path )} "\n ' )
180
+ f .write (f'#include "{ INCLUDE_PREFIX } { os .path .basename (output_h_path )} "\n \n ' )
181
181
f .write ('#include <stddef.h>\n \n ' )
182
- f .write ('// Google Analytics Windows DLL SHA256 hash, to be verified on load.\n ' )
183
- f .write ('const unsigned char FirebaseAnalytics_WindowsDllHash[] = {' )
184
- f .write (',' .join (["0x%02x" % s for s in dll_hash ]))
185
- f .write ('};\n \n ' )
186
- f .write ("// clang-format off\n \n " )
187
182
f .write ("static void* g_stub_memory = NULL;\n \n " )
183
+ f .write ("// clang-format off\n \n " )
184
+ f .write ('// Google Analytics Windows DLL SHA256 hash, to be verified on load.\n ' )
185
+ f .write ('const unsigned char FirebaseAnalytics_WindowsDllHash[] = {\n ' )
186
+ f .write (', ' .join (["0x%02x" % s for s in dll_hash ]))
187
+ f .write ('\n };\n \n ' )
188
188
f .write ("// --- Stub Function Definitions ---\n " )
189
189
f .write ("\n \n " .join (stub_functions ))
190
190
f .write ("\n \n \n // --- Function Pointer Initializations ---\n " )
0 commit comments