Merge pull request #765 from richardbeare/RexternCRemove

This changes the location of the R includes to match what is required from the documentation by moving C++ includes outside of the extern "C" block.
This commit is contained in:
joequant 2016-08-09 13:47:05 +08:00 committed by GitHub
commit 1fcbf07441

View file

@ -1,15 +1,4 @@
#ifdef __cplusplus
#include <exception>
extern "C" {
#endif
/* for raw pointer */
#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_R_ConvertPtr(obj, pptr, type, flags)
#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_R_ConvertPtr(obj, pptr, type, flags)
#define SWIG_NewPointerObj(ptr, type, flags) SWIG_R_NewPointerObj(ptr, type, flags)
/* Remove global namespace pollution */
#if !defined(SWIG_NO_R_NO_REMAP)
# define R_NO_REMAP
@ -20,6 +9,17 @@ extern "C" {
#include <Rdefines.h>
#include <Rversion.h>
#ifdef __cplusplus
#include <exception>
extern "C" {
#endif
/* for raw pointer */
#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_R_ConvertPtr(obj, pptr, type, flags)
#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_R_ConvertPtr(obj, pptr, type, flags)
#define SWIG_NewPointerObj(ptr, type, flags) SWIG_R_NewPointerObj(ptr, type, flags)
#include <stdlib.h>
#include <assert.h>