Rgmp.h 532 Bytes
Newer Older
Antoine Lucas's avatar
import  
Antoine Lucas committed
1
2
3
4
5
6
7
#ifndef R_gmp_HEADER
#define R_gmp_HEADER 1

// gmp.h calls cstddef with __need_size_t defined
#include <cstddef>
#include <cstdlib>
#include <cmath>
8

Antoine Lucas's avatar
import  
Antoine Lucas committed
9
10
11
12
#include <gmp.h>


#include <R.h>
13

Antoine Lucas's avatar
import  
Antoine Lucas committed
14
#include <Rinternals.h>
15
#ifndef AS_INTEGER
Antoine Lucas's avatar
import  
Antoine Lucas committed
16
// the only thing we use from <Rdefines.h> :
17
18
#define AS_INTEGER(x) Rf_coerceVector(x,INTSXP)
#endif
Antoine Lucas's avatar
import  
Antoine Lucas committed
19
20
21
22
23
24
25
26
27
28

#define class_P(_x_) CHAR(Rf_asChar(Rf_getAttrib(_x_, R_ClassSymbol)))

#ifdef ENABLE_NLS
#include <libintl.h>
#define _(String) dgettext ("main", String)
#else
#define _(String) (String)
#endif
#endif