1
- #include <stdarg.h> // va_list, va_start, va_end
2
- #include <stdio.h> // vsnprintf
1
+ /* Remove global namespace pollution */
2
+ #if !defined(SWIG_NO_R_NO_REMAP)
3
+ # define R_NO_REMAP
4
+ #endif
5
+ #if !defined(SWIG_NO_STRICT_R_HEADERS)
6
+ # define STRICT_R_HEADERS
7
+ #endif
8
+
9
+ #include <Rdefines.h>
10
+ #include <Rversion.h>
11
+
12
+ #ifdef __cplusplus
13
+ #include <exception>
14
+ extern "C" {
15
+ #endif
16
+
17
+ /* for raw pointer */
18
+ #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_R_ConvertPtr(obj, pptr, type, flags)
19
+ #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_R_ConvertPtr(obj, pptr, type, flags)
20
+ #define SWIG_NewPointerObj(ptr, type, flags) SWIG_R_NewPointerObj(ptr, type, flags)
21
+
22
+ #include <stdio.h>
23
+ #include <stdlib.h>
24
+ #include <assert.h>
25
+ #include <stdarg.h>
26
+
27
+ #if R_VERSION >= R_Version(2,6,0)
28
+ #define VMAXTYPE void *
29
+ #else
30
+ #define VMAXTYPE char *
31
+ #endif
3
32
4
33
/* Last error */
5
34
static int SWIG_lasterror_code = 0;
@@ -12,7 +41,7 @@ SWIGRUNTIME void SWIG_Error(int code, const char *format, ...) {
12
41
va_end(arg);
13
42
}
14
43
15
- SWIGRUNTIME const char* SWIG_ErrorType(int code) {
44
+ SWIGRUNTIME const char * SWIG_ErrorType(int code) {
16
45
switch (code) {
17
46
case SWIG_MemoryError:
18
47
return "SWIG:MemoryError";
@@ -42,37 +71,6 @@ SWIGRUNTIME const char* SWIG_ErrorType(int code) {
42
71
43
72
#define SWIG_fail goto fail
44
73
45
- /* Remove global namespace pollution */
46
- #if !defined(SWIG_NO_R_NO_REMAP)
47
- # define R_NO_REMAP
48
- #endif
49
- #if !defined(SWIG_NO_STRICT_R_HEADERS)
50
- # define STRICT_R_HEADERS
51
- #endif
52
-
53
- #include <Rdefines.h>
54
- #include <Rversion.h>
55
-
56
- #ifdef __cplusplus
57
- #include <exception>
58
- extern "C" {
59
- #endif
60
-
61
- /* for raw pointer */
62
- #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_R_ConvertPtr(obj, pptr, type, flags)
63
- #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_R_ConvertPtr(obj, pptr, type, flags)
64
- #define SWIG_NewPointerObj(ptr, type, flags) SWIG_R_NewPointerObj(ptr, type, flags)
65
-
66
- #include <stdio.h>
67
- #include <stdlib.h>
68
- #include <assert.h>
69
-
70
- #if R_VERSION >= R_Version(2,6,0)
71
- #define VMAXTYPE void *
72
- #else
73
- #define VMAXTYPE char *
74
- #endif
75
-
76
74
/*
77
75
This is mainly a way to avoid having lots of local variables that may
78
76
conflict with those in the routine.
0 commit comments