The R Project SVN R

Rev

Rev 72316 | Rev 82994 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 72316 Rev 72375
Line 23... Line 23...
23
 
23
 
24
/*
24
/*
25
  C functions used to register compiled code in packages.
25
  C functions used to register compiled code in packages.
26
 
26
 
27
  Those needed for that purpose are part of the API.
27
  Those needed for that purpose are part of the API.
-
 
28
 
-
 
29
  Cleaned up for R 3.4.0, some changes require recompilation of packages.
28
 */
30
 */
29
 
31
 
30
#ifndef  R_EXT_DYNLOAD_H_
32
#ifndef  R_EXT_DYNLOAD_H_
31
#define  R_EXT_DYNLOAD_H_
33
#define  R_EXT_DYNLOAD_H_
32
 
34
 
Line 35... Line 37...
35
/* called with a variable argument set */
37
/* called with a variable argument set */
36
typedef void * (*DL_FUNC)();
38
typedef void * (*DL_FUNC)();
37
 
39
 
38
typedef unsigned int R_NativePrimitiveArgType;
40
typedef unsigned int R_NativePrimitiveArgType;
39
 
41
 
40
#define SINGLESXP 302 /* Don't have a single type for this. */
-
 
41
 
-
 
42
/* In the future, we will want to allow people register their own types
42
/* For interfaces to objects created with as.single */
43
   and then refer to these in other contexts. Something like the Gtk type
-
 
44
   system may be appropriate.
43
#define SINGLESXP 302
45
*/
-
 
46
typedef unsigned int R_NativeObjectArgType;
-
 
47
 
-
 
48
 
44
 
49
/*
45
/*
50
   Values for styles: deprecated in R 3.3.3 but still used by some packages.
-
 
51
*/
-
 
52
typedef enum {R_ARG_IN, R_ARG_OUT, R_ARG_IN_OUT, R_IRRELEVANT} R_NativeArgStyle;
-
 
53
 
-
 
54
 
-
 
55
 
-
 
56
/*
-
 
57
 These are very similar to those in  unix/dynload.c
46
 These are very similar to those in Rdynpriv.h,
58
 but we maintain them separately to give us more freedom to do
47
 but we maintain them separately to give us more freedom to do
59
 some computations on the internal versions that are derived from
48
 some computations on the internal versions that are derived from
60
 these definitions.
49
 these definitions.
61
*/
50
*/
62
typedef struct {
51
typedef struct {
63
    const char *name;
52
    const char *name;
64
    DL_FUNC     fun;
53
    DL_FUNC     fun;
65
    int         numArgs;
54
    int         numArgs;
66
 
-
 
67
    R_NativePrimitiveArgType *types;
55
    R_NativePrimitiveArgType *types;
68
    R_NativeArgStyle         *styles;  // deprecated in 3.3.3, defunct in 3.4.0
-
 
69
 
-
 
70
} R_CMethodDef;
56
} R_CMethodDef;
71
 
57
 
72
typedef R_CMethodDef R_FortranMethodDef;
58
typedef R_CMethodDef R_FortranMethodDef;
73
 
59
 
74
 
60
 
Line 98... Line 84...
98
Rboolean R_useDynamicSymbols(DllInfo *info, Rboolean value);
84
Rboolean R_useDynamicSymbols(DllInfo *info, Rboolean value);
99
Rboolean R_forceSymbols(DllInfo *info, Rboolean value);
85
Rboolean R_forceSymbols(DllInfo *info, Rboolean value);
100
 
86
 
101
DllInfo *R_getDllInfo(const char *name);
87
DllInfo *R_getDllInfo(const char *name);
102
 
88
 
103
/* to be used by applications embedding R to register their symbols
89
/* To be used by applications embedding R to register their symbols
104
   that are not related to any dynamic module */
90
   that are not related to any dynamic module */
105
DllInfo *R_getEmbeddingDllInfo(void);
91
DllInfo *R_getEmbeddingDllInfo(void);
106
 
92
 
107
typedef struct Rf_RegisteredNativeSymbol R_RegisteredNativeSymbol;
93
typedef struct Rf_RegisteredNativeSymbol R_RegisteredNativeSymbol;
108
typedef enum {R_ANY_SYM=0, R_C_SYM, R_CALL_SYM, R_FORTRAN_SYM, R_EXTERNAL_SYM} NativeSymbolType;
94
typedef enum {R_ANY_SYM=0, R_C_SYM, R_CALL_SYM, R_FORTRAN_SYM, R_EXTERNAL_SYM} NativeSymbolType;