diff options
author | Artem Senichev <artemsen@gmail.com> | 2019-02-22 16:06:08 +0300 |
---|---|---|
committer | Alistair Popple <alistair@popple.id.au> | 2019-03-26 11:55:59 +1100 |
commit | 12abf3f3546f20b74be64c51b634d2caab2fbd00 (patch) | |
tree | 38b2b3544e765a975eb9f0de9e7bb25089afedb7 /libpdbg/libpdbg.h | |
parent | 39f85aac1ae5998407f6428b71d469a4520823f8 (diff) | |
download | pdbg-12abf3f3546f20b74be64c51b634d2caab2fbd00.tar.gz pdbg-12abf3f3546f20b74be64c51b634d2caab2fbd00.zip |
api: Fix API interface for external usage
1. File 'ccan/short_types/short_types.h' is not used by external interface
and should be used as internal dependency only (ccan directory is not
installed by make script).
2. Extern "C" declaration of API allows us to call libpdbg functions
from C++ modules.
Signed-off-by: Artem Senichev <artemsen@gmail.com>
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Diffstat (limited to 'libpdbg/libpdbg.h')
-rw-r--r-- | libpdbg/libpdbg.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h index b332a7e..4fad158 100644 --- a/libpdbg/libpdbg.h +++ b/libpdbg/libpdbg.h @@ -8,7 +8,9 @@ #include <stdbool.h> -#include <ccan/short_types/short_types.h> +#ifdef __cplusplus +extern "C" { +#endif struct pdbg_target; struct pdbg_target_class; @@ -244,4 +246,8 @@ void pdbg_set_logfunc(pdbg_log_func_t fn); void pdbg_set_loglevel(int loglevel); void pdbg_log(int loglevel, const char *fmt, ...); +#ifdef __cplusplus +} +#endif + #endif |