Writing R extensions says:
Most R header files can be included within C++ programs but they should not be included within an extern "C" block (as they include system headers). This patch moves the Rdefines.h and Rversion.h outside the extern block.
This commit is contained in:
parent
a950d1309b
commit
c334efd36b
1 changed files with 11 additions and 11 deletions
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue