]> git.lttng.org Git - lttng-tools.git/commitdiff
session-config: Correct `config_xml_encoding_bytes_per_char`'s exported type
authorKienan Stewart <kstewart@efficios.com>
Mon, 16 Dec 2024 14:36:46 +0000 (09:36 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 16 Jan 2025 19:21:02 +0000 (19:21 +0000)
The ABI diff reports the following variable type change:

```
1 Changed variable:

  [C] 'const size_t config_xml_encoding_bytes_per_char' was changed to 'std::size_t config_xml_encoding_bytes_per_char' at session
-config.cpp:55:1:
    type of variable changed:
      entity changed from 'const size_t' to 'typedef std::size_t' at c++config.h:310:1
      type size hasn't changed
```

This patch also takes the opportunity to ensure that the "C" linkage
is used for the exported variables.

Change-Id: Id9739d290d1872bc803d2925ffa1d40b04c3e553
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/config/session-config.cpp

index 719c2e876224ea1042bcd56640610ed4a11632d6..043b4de07e6db09a09050d54d9f5da42c022076c 100644 (file)
@@ -49,15 +49,24 @@ struct session_config_validation_ctx {
 };
 } /* namespace */
 
-const char *const config_element_all = "all";
+#ifdef __cpluslus
+extern "C" {
+#endif
+
 LTTNG_EXPORT extern const char *const config_xml_encoding;
-const char *const config_xml_encoding = "UTF-8";
-LTTNG_EXPORT size_t config_xml_encoding_bytes_per_char = 2; /* Size of the encoding's largest
-                                                              character */
+LTTNG_EXPORT extern const size_t config_xml_encoding_bytes_per_char; /* Size of the encoding's
+                                                                       largest character */
 LTTNG_EXPORT extern const char *const config_xml_indent_string;
 LTTNG_EXPORT extern const char *const config_xml_true;
 LTTNG_EXPORT extern const char *const config_xml_false;
 
+#ifdef __cpluslus
+}
+#endif
+
+const char *const config_element_all = "all";
+const char *const config_xml_encoding = "UTF-8";
+const size_t config_xml_encoding_bytes_per_char = 2;
 const char *const config_xml_indent_string = "\t";
 const char *const config_xml_true = "true";
 const char *const config_xml_false = "false";
This page took 0.030421 seconds and 4 git commands to generate.