[Xts-commits] r761 - pkg/xts/inst/include

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jan 18 15:10:54 CET 2013


Author: edd
Date: 2013-01-18 15:10:54 +0100 (Fri, 18 Jan 2013)
New Revision: 761

Modified:
   pkg/xts/inst/include/xts.h
   pkg/xts/inst/include/xtsAPI.h
Log:
 o added header guards for xtsAPI
 o added extern "C" when included from C++ for xtsAPI and xts


Modified: pkg/xts/inst/include/xts.h
===================================================================
--- pkg/xts/inst/include/xts.h	2013-01-17 02:47:27 UTC (rev 760)
+++ pkg/xts/inst/include/xts.h	2013-01-18 14:10:54 UTC (rev 761)
@@ -18,6 +18,9 @@
 #ifndef _XTS
 #define _XTS
 
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 /*
 INTERNAL SYMBOLS
@@ -83,3 +86,7 @@
 int isXts(SEXP x);                          // is.xts analogue
 int firstNonNA(SEXP x);
 #endif /* _XTS */
+
+#ifdef __cplusplus
+}
+#endif

Modified: pkg/xts/inst/include/xtsAPI.h
===================================================================
--- pkg/xts/inst/include/xtsAPI.h	2013-01-17 02:47:27 UTC (rev 760)
+++ pkg/xts/inst/include/xtsAPI.h	2013-01-18 14:10:54 UTC (rev 761)
@@ -13,18 +13,24 @@
 as the full xts software, GPL (>= 2).
 */
 
+#ifndef _XTS_API_H
+#define _XTS_API_H
+
 #include <xts.h>		// also includes R.h, Rinternals.h, Rdefines.h
 
 #include <Rconfig.h>
 #include <R_ext/Rdynload.h>
 
-
 #ifdef HAVE_VISIBILITY_ATTRIBUTE
   # define attribute_hidden __attribute__ ((visibility ("hidden")))
 #else
   # define attribute_hidden
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
   To aid those looking for answers on interfacing compiled code from
   another package.
@@ -86,3 +92,9 @@
 	fun = (SEXP(*)(SEXP,SEXP,SEXP)) R_GetCCallable("xts","lagXts");
     return fun(x, k, pad);
 }
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !_XTS_API_H */



More information about the Xts-commits mailing list