aboutsummaryrefslogtreecommitdiffstats
path: root/build-aux
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-10-09 12:09:44 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-10-09 15:23:48 +0200
commit586aba166aaa9fae91318917c73fd3c30c045def (patch)
tree59800e4c56197452e97492e4588fe2d1f48128da /build-aux
parent3bbdc479476a401398b1b62dac9a881bfc636feb (diff)
downloadexternal_libqmi-586aba166aaa9fae91318917c73fd3c30c045def.zip
external_libqmi-586aba166aaa9fae91318917c73fd3c30c045def.tar.gz
external_libqmi-586aba166aaa9fae91318917c73fd3c30c045def.tar.bz2
qmi-codegen: make internal get_printable() and get_version_introduced()
These methods are (should only be) used only by the library.
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/qmi-codegen/MessageList.py38
1 files changed, 18 insertions, 20 deletions
diff --git a/build-aux/qmi-codegen/MessageList.py b/build-aux/qmi-codegen/MessageList.py
index 7d3802d..ac375fe 100644
--- a/build-aux/qmi-codegen/MessageList.py
+++ b/build-aux/qmi-codegen/MessageList.py
@@ -113,15 +113,21 @@ class MessageList:
template = (
'\n'
- 'gchar *qmi_message_${service}_get_printable (\n'
+ '#if defined (LIBQMI_GLIB_COMPILATION)\n'
+ '\n'
+ 'G_GNUC_INTERNAL\n'
+ 'gchar *__qmi_message_${service}_get_printable (\n'
' QmiMessage *self,\n'
- ' const gchar *line_prefix);\n')
+ ' const gchar *line_prefix);\n'
+ '\n'
+ '#endif\n'
+ '\n')
hfile.write(string.Template(template).substitute(translations))
template = (
'\n'
'gchar *\n'
- 'qmi_message_${service}_get_printable (\n'
+ '__qmi_message_${service}_get_printable (\n'
' QmiMessage *self,\n'
' const gchar *line_prefix)\n'
'{\n'
@@ -173,16 +179,22 @@ class MessageList:
template = (
'\n'
- 'gboolean qmi_message_${service}_get_version_introduced (\n'
+ '#if defined (LIBQMI_GLIB_COMPILATION)\n'
+ '\n'
+ 'G_GNUC_INTERNAL\n'
+ 'gboolean __qmi_message_${service}_get_version_introduced (\n'
' QmiMessage *self,\n'
' guint *major,\n'
- ' guint *minor);\n')
+ ' guint *minor);\n'
+ '\n'
+ '#endif\n'
+ '\n')
hfile.write(string.Template(template).substitute(translations))
template = (
'\n'
'gboolean\n'
- 'qmi_message_${service}_get_version_introduced (\n'
+ '__qmi_message_${service}_get_version_introduced (\n'
' QmiMessage *self,\n'
' guint *major,\n'
' guint *minor)\n'
@@ -237,17 +249,3 @@ class MessageList:
# Emit all message sections
for message in self.list:
message.emit_sections(sfile)
-
- translations = { 'hyphened' : utils.build_dashed_name (self.service + 'Private'),
- 'service' : utils.build_underscore_name (self.service) }
-
- # Emit dummy section for service-specific private methods
- template = (
- '<SECTION>\n'
- '<FILE>${hyphened}</FILE>\n'
- '<SUBSECTION Private>\n'
- 'qmi_message_${service}_get_printable\n'
- 'qmi_message_${service}_get_version_introduced\n'
- '</SECTION>\n'
- '\n')
- sfile.write(string.Template(template).substitute(translations))