8000 Resoved Travis CI - issue · esp8266/Arduino@d7363e0 · GitHub
[go: up one dir, main page]

Skip to content

Commit d7363e0

Browse files
committed
Resoved Travis CI - issue
1 parent b508642 commit d7363e0

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

cores/esp8266/umm_malloc/umm_malloc_cfg.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -552,19 +552,20 @@ void free_loc (void* p, const char* file, int line);
552552

553553
#endif /* _UMM_MALLOC_CFG_H */
554554

555+
#ifdef __cplusplus
556+
extern "C" {
557+
#endif
555558
#ifdef DEBUG_ESP_OOM
556559
// this must be outside from "#ifndef _UMM_MALLOC_CFG_H"
557560
// because Arduino.h's <cstdlib> does #undef *alloc
558561
// Arduino.h recall us to redefine them
559562
#include <pgmspace.h>
560563
// Reuse pvPort* calls, since they already support passing location information.
561-
extern "C" {
562564
void* ICACHE_RAM_ATTR pvPortMalloc(size_t size, const char* file, int line);
563565
void* ICACHE_RAM_ATTR pvPortCalloc(size_t count, size_t size, const char* file, int line);
564566
void* ICACHE_RAM_ATTR pvPortRealloc(void *ptr, size_t size, const char* file, int line);
565567
void* ICACHE_RAM_ATTR pvPortZalloc(size_t size, const char* file, int line);
566568
void ICACHE_RAM_ATTR vPortFree(void *ptr, const char* file, int line);
567-
};
568569
#define malloc(s) ({ static const char mem_debug_file[] PROGMEM STORE_ATTR = __FILE__; pvPortMalloc(s, mem_debug_file, __LINE__); })
569570
#define calloc(n,s) ({ static const char mem_debug_file[] PROGMEM STORE_ATTR = __FILE__; pvPortCalloc(n, s, mem_debug_file, __LINE__); })
570571
#define realloc(p,s) ({ static const char mem_debug_file[] PROGMEM STORE_ATTR = __FILE__; pvPortRealloc(p, s, mem_debug_file, __LINE__); })
@@ -576,10 +577,10 @@ void ICACHE_RAM_ATTR vPortFree(void *ptr, const char* file, int line);
576577

577578
#elif defined(UMM_POISON_CHECK)
578579
#include <pgmspace.h>
579-
extern "C" {
580+
580581
void* ICACHE_RAM_ATTR pvPortRealloc(void *ptr, size_t size, const char* file, int line);
581582
void ICACHE_RAM_ATTR vPortFree(void *ptr, const char* file, int line);
582-
};
583+
583584
#define realloc(p,s) ({ static const char mem_debug_file[] PROGMEM STORE_ATTR = __FILE__; pvPortRealloc(p, s, mem_debug_file, __LINE__); })
584585
#if 0
585586
//C
@@ -597,3 +598,7 @@ void ICACHE_RAM_ATTR vPortFree(void *ptr, const char* file, int line);
597598
#endif
598599

599600
#endif /* DEBUG_ESP_OOM */
601+
602+
#ifdef __cplusplus
603+
}
604+
#endif

0 commit comments

Comments
 (0)
0