summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-06-28 11:36:38 +0200
committerBardur Arantsson <bardur@scientician.net>2012-06-28 11:36:38 +0200
commit37a488bff1aa553bff9116f1bf56d5402a7732fa (patch)
tree62986ab57d933a6add3774b8d64838a0322e3421 /src
parentbe5ec8c7d9945b268202483609ff43a66b59ef0d (diff)
Add "extern C" declarations for C++
Diffstat (limited to 'src')
-rw-r--r--src/h-type.h9
-rw-r--r--src/quark.h8
2 files changed, 17 insertions, 0 deletions
diff --git a/src/h-type.h b/src/h-type.h
index 27551b7f..145d4729 100644
--- a/src/h-type.h
+++ b/src/h-type.h
@@ -3,6 +3,11 @@
#ifndef INCLUDED_H_TYPE_H
#define INCLUDED_H_TYPE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/*
* Basic "types".
*
@@ -180,5 +185,9 @@ typedef vptr (*func_key)(vptr);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif
diff --git a/src/quark.h b/src/quark.h
index 93cb938f..9488b105 100644
--- a/src/quark.h
+++ b/src/quark.h
@@ -3,8 +3,16 @@
#include "h-type.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void quark_init();
cptr quark_str(s16b num);
s16b quark_add(cptr str);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif