Skip to content
This repository was archived by the owner on Aug 19, 2021. It is now read-only.

Commit e249e2d

Browse files
committed
Added c-compatible gaurds to events.h
Allows events.h to be included from C files to access the C api. note: This does not introduce the C api into the namespace. The C api was previously dragged in indirectly from EventQueue.h.
1 parent 1fb6a0e commit e249e2d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

EventQueue.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "EventQueue.h"
22

3-
#include "events-c/events.h"
43
#include "events.h"
54
#include "mbed.h"
65

events.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,18 @@
1616
#ifndef EVENTS_CPP_H
1717
#define EVENTS_CPP_H
1818

19+
20+
#include "events-c/events.h"
21+
22+
23+
#ifdef __cplusplus
24+
1925
#include "EventQueue.h"
2026
#include "EventLoop.h"
2127

2228
using namespace events;
2329

2430
#endif
31+
32+
33+
#endif

0 commit comments

Comments
 (0)