Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add C++ checks to header files of C runtime

  • Loading branch information...
commit be7af1e74df2367e5d68f93f4f7c38de986c2615 1 parent f858778
@orlandohill orlandohill authored
View
8 src/c/include/waxeye.h
@@ -8,9 +8,17 @@
#ifndef WAXEYE_H_
#define WAXEYE_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdlib.h>
#include <waxeye/ast.h>
#include <waxeye/input.h>
#include <waxeye/wparser.h>
+#ifdef __cplusplus
+}
+#endif
+
#endif /* WAXEYE_H_ */
View
9 src/c/include/waxeye/ast.h
@@ -8,6 +8,10 @@
#ifndef AST_H_
#define AST_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <waxeye/vector.h>
#define INIT_CHILDREN 8
@@ -64,4 +68,9 @@ extern void display_ast(struct ast_t *a, const char *type_strings[]);
extern char *ast_children_as_string(struct ast_t *a);
#endif /* AST_C_ */
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* AST_H_ */
View
9 src/c/include/waxeye/edge.h
@@ -8,6 +8,10 @@
#ifndef EDGE_H_
#define EDGE_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdbool.h>
#include <waxeye/trans.h>
@@ -25,4 +29,9 @@ extern void edge_clear(struct edge_t *e);
extern void edge_delete(struct edge_t *e);
#endif /* EDGE_C_ */
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EDGE_H_ */
View
9 src/c/include/waxeye/fa.h
@@ -8,6 +8,10 @@
#ifndef FA_H_
#define FA_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <waxeye/state.h>
enum fa_mode {
@@ -33,4 +37,9 @@ extern void fa_clear(struct fa_t *fa);
extern void fa_delete(struct fa_t *fa);
#endif /* FA_C_ */
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* FA_H_ */
View
9 src/c/include/waxeye/input.h
@@ -8,6 +8,10 @@
#ifndef INPUT_H_
#define INPUT_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdbool.h>
#include <stdio.h>
@@ -31,4 +35,9 @@ extern char input_consume(struct input_t *b);
extern char input_peek(struct input_t *b);
#endif /* INPUT_C_ */
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* INPUT_H_ */
View
9 src/c/include/waxeye/set.h
@@ -8,6 +8,10 @@
#ifndef SET_H_
#define SET_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdbool.h>
struct set_t {
@@ -27,4 +31,9 @@ extern void set_delete(struct set_t *s);
extern bool set_within_set(struct set_t *s, char ch);
#endif /* SET_C_ */
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* SET_H_ */
View
9 src/c/include/waxeye/state.h
@@ -8,6 +8,10 @@
#ifndef STATE_H_
#define STATE_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdbool.h>
#include <waxeye/edge.h>
@@ -25,4 +29,9 @@ extern void state_clear(struct state_t *s);
extern void state_delete(struct state_t *s);
#endif /* STATE_C_ */
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* STATE_H_ */
View
9 src/c/include/waxeye/trans.h
@@ -8,6 +8,10 @@
#ifndef TRANS_H_
#define TRANS_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <waxeye/set.h>
/*
@@ -43,4 +47,9 @@ extern void trans_clear(struct trans_t *s);
extern void trans_delete(struct trans_t *s);
#endif /* TRANS_C_ */
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* TRANS_H_ */
View
9 src/c/include/waxeye/vector.h
@@ -8,6 +8,10 @@
#ifndef VECTOR_H_
#define VECTOR_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct vector_t {
void **elements;
size_t capacity;
@@ -31,4 +35,9 @@ extern void* vector_peek(struct vector_t *v);
extern void vector_reverse(struct vector_t *v);
#endif /* VECTOR_C_ */
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* VECTOR_H_ */
View
9 src/c/include/waxeye/wparser.h
@@ -8,6 +8,10 @@
#ifndef WPARSER_H_
#define WPARSER_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdbool.h>
#include <waxeye/ast.h>
#include <waxeye/fa.h>
@@ -29,4 +33,9 @@ extern void parser_delete(struct parser_t *s);
extern struct ast_t* parse(struct parser_t *parser, struct input_t *input);
#endif /* WPARSER_C_ */
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* WPARSER_H_ */
Please sign in to comment.
Something went wrong with that request. Please try again.