From 406af09ade55553e2b064506c3ba3c89bd965d73 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Thu, 4 Mar 2021 19:11:42 -0500 Subject: start of a c++ widget toolkit, c++ runtime --- src/user/include/knob/block.h | 8 ++++++++ src/user/include/knob/heap.h | 8 ++++++++ 2 files changed, 16 insertions(+) (limited to 'src/user/include/knob') diff --git a/src/user/include/knob/block.h b/src/user/include/knob/block.h index 1231a6d..565c334 100644 --- a/src/user/include/knob/block.h +++ b/src/user/include/knob/block.h @@ -1,6 +1,10 @@ #ifndef KNOB_BLOCK_H #define KNOB_BLOCK_H +#ifdef __cplusplus +extern "C" { +#endif + #include #include @@ -24,4 +28,8 @@ bool strequ(const char *a, const char *b) __attribute__ ((pure)); //this replacement happens in place, with no memory allocation void str_trunc_fill(char *str, uint32_t len); +#ifdef __cplusplus +} +#endif + #endif \ No newline at end of file diff --git a/src/user/include/knob/heap.h b/src/user/include/knob/heap.h index 32dc44c..c0d7006 100644 --- a/src/user/include/knob/heap.h +++ b/src/user/include/knob/heap.h @@ -1,9 +1,17 @@ #ifndef KNOB_HEAP_H #define KNOB_HEAP_H +#ifdef __cplusplus +extern "C" { +#endif + #include void *get_block(uint32_t bytes) __attribute__ ((malloc)); void free_block(void *block); +#ifdef __cplusplus +} +#endif + #endif \ No newline at end of file -- cgit v1.2.3