]> granicus.if.org Git - esp-idf/commitdiff
heap: Add C++ header guards to heap headers
authorAngus Gratton <angus@espressif.com>
Thu, 16 Nov 2017 23:16:46 +0000 (10:16 +1100)
committerAngus Gratton <gus@projectgus.com>
Tue, 21 Nov 2017 23:08:50 +0000 (10:08 +1100)
Closes https://github.com/espressif/esp-idf/issues/1195

components/heap/include/esp_heap_caps_init.h
components/heap/include/esp_heap_trace.h

index 5cfb8d82b51a65b2a1ec9c0f6470efca307577f9..3cf23ff7f378a2fa8e1a32ee50895d5a8886613c 100644 (file)
 #include "esp_heap_caps.h"
 #include "soc/soc_memory_layout.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @brief Initialize the capability-aware heap allocator.
  *
@@ -82,5 +86,6 @@ esp_err_t heap_caps_add_region(intptr_t start, intptr_t end);
 esp_err_t heap_caps_add_region_with_caps(const uint32_t caps[], intptr_t start, intptr_t end);
 
 
-
-
+#ifdef __cplusplus
+}
+#endif
index 24b5c60f55c3325654873ede4f187125f87cda6e..08b8caa21840b5217ca6475afd2c4959f6e02719 100644 (file)
 #include <stdint.h>
 #include <esp_err.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if !defined(CONFIG_HEAP_TRACING) && !defined(HEAP_TRACE_SRCFILE)
 #warning "esp_heap_trace.h is included but heap tracing is disabled in menuconfig, functions are no-ops"
 #endif
@@ -134,3 +138,7 @@ esp_err_t heap_trace_get(size_t index, heap_trace_record_t *record);
  *
  */
 void heap_trace_dump(void);
+
+#ifdef __cplusplus
+}
+#endif