Mesa (master): util: Add extern c to u_dynarray.h

Marek Olšák mareko at kemper.freedesktop.org
Wed Jun 7 19:08:48 UTC 2017


Module: Mesa
Branch: master
Commit: 4ba4f0e97673bae2d3a8b7e5bac3210a4c2d944e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4ba4f0e97673bae2d3a8b7e5bac3210a4c2d944e

Author: Thomas Helland <thomashelland90 at gmail.com>
Date:   Sat Jun  3 19:59:07 2017 +0200

util: Add extern c to u_dynarray.h

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>

---

 src/util/u_dynarray.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/util/u_dynarray.h b/src/util/u_dynarray.h
index ad3889a7c8..e9109ccd2d 100644
--- a/src/util/u_dynarray.h
+++ b/src/util/u_dynarray.h
@@ -30,6 +30,10 @@
 #include <stdlib.h>
 #include "ralloc.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* A zero-initialized version of this is guaranteed to represent an
  * empty array.
  *
@@ -134,5 +138,9 @@ util_dynarray_trim(struct util_dynarray *buf)
    for (type *elem = (type *)(buf)->data; \
         elem < (type *)((char *)(buf)->data + (buf)->size); elem++)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* U_DYNARRAY_H */
 




More information about the mesa-commit mailing list