[Libreoffice-commits] core.git: solenv/bin
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Nov 9 08:54:17 UTC 2018
solenv/bin/native-code.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit a75b8e11664b14884fafac32f1dba678537cd3dc
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Nov 8 21:30:06 2018 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Nov 9 09:52:23 2018 +0100
make factory a little more legible
Change-Id: I555e01ede3d8ce2a08f67c3ce6fc686861ea6519
Reviewed-on: https://gerrit.libreoffice.org/63139
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index ebdba44a6aba..8bde580dda5a 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -638,15 +638,16 @@ for constructor in sorted(full_constructor_map.keys()):
print ('')
for entry in sorted(custom_widgets):
print ('void make' + entry + '();')
-print ('static struct { const char *name; void(*func)(); } custom_widgets[] = {')
+print ('typedef void (*custom_widget_func)();')
+print ('static struct { const char *name; custom_widget_func func; } custom_widgets[] = {')
for entry in sorted(custom_widgets):
print (' { "make' + entry + '", make' + entry + ' },')
print ('};')
print ('')
print ("""
-void (*lo_get_custom_widget_func(const char* name))()
+custom_widget_func lo_get_custom_widget_func(const char* name)
{
- for (int i = 0; i < sizeof(custom_widgets) / sizeof(custom_widgets[0]); i++)
+ for (size_t i = 0; i < sizeof(custom_widgets) / sizeof(custom_widgets[0]); i++)
if (strcmp(name, custom_widgets[i].name) == 0)
return custom_widgets[i].func;
return nullptr;
More information about the Libreoffice-commits
mailing list