From ecdab8cce6eb5cb18f381b6e6d1b474e9cb19219 Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 6 Aug 2024 10:23:08 +1200 Subject: [PATCH] bindings: add C include guard, also wrap typedefs in extern --- binding.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/binding.h b/binding.h index f7d137b..2c4da3f 100644 --- a/binding.h +++ b/binding.h @@ -1,12 +1,16 @@ +#ifndef BINDING_H +#define BINDING_H + +#ifdef __cplusplus +extern "C" { +#endif + typedef void* PQApplication; typedef void* PQPushButton; typedef void* PQWidget; -#ifdef __cplusplus -extern "C" { -#endif PQApplication QApplication_new(int* argc, char** argv); PQWidget QWidget_new(); @@ -22,3 +26,5 @@ int QApplication_exec(PQApplication self); #ifdef __cplusplus } /* extern C */ #endif + +#endif