The R Project SVN R

Rev

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

Rev 19500 Rev 20110
Line 22... Line 22...
22
 
22
 
23
#include <R_ext/Boolean.h>
23
#include <R_ext/Boolean.h>
24
 
24
 
25
typedef void * (*DL_FUNC)();
25
typedef void * (*DL_FUNC)();
26
 
26
 
-
 
27
typedef unsigned int R_NativePrimitiveArgType;
-
 
28
 
-
 
29
#define SINGLESXP 302 /* Don't have a single type for this. */
-
 
30
 
-
 
31
/* In the future, we will want to allow people register their own types
-
 
32
   and then refer to these in other contexts. Something like the Gtk type 
-
 
33
   system may be appropriate.
-
 
34
*/
-
 
35
typedef unsigned int R_NativeObjectArgType;
-
 
36
 
-
 
37
 
-
 
38
/* In the near future, we may support registering 
-
 
39
   information about the arguments of native routines 
-
 
40
   and whether they are used to return information.
-
 
41
   The hope is that we can minimize copying objects even 
-
 
42
   further. Not currently in use.
-
 
43
*/
-
 
44
typedef enum {R_ARG_IN, R_ARG_OUT, R_ARG_IN_OUT, R_IRRELEVANT} R_NativeArgStyle;
-
 
45
 
-
 
46
 
-
 
47
 
27
/* 
48
/* 
28
 These are very similar to those in  unix/dynload.c
49
 These are very similar to those in  unix/dynload.c
29
 but we maintain them separately to give us more freedom to do
50
 but we maintain them separately to give us more freedom to do
30
 some computations on the internal versions that are derived from
51
 some computations on the internal versions that are derived from
31
 these definitions.
52
 these definitions.
32
*/
53
*/
33
typedef struct {
54
typedef struct {
34
    const char *name;
55
    const char *name;
35
    DL_FUNC     fun;
56
    DL_FUNC     fun;
36
    int         numArgs;
57
    int         numArgs;
37
 
58
  
-
 
59
    R_NativePrimitiveArgType *types;
-
 
60
    R_NativeArgStyle         *styles; 
-
 
61
    
38
} R_CMethodDef;
62
} R_CMethodDef;
39
 
63
 
40
typedef struct {
64
typedef R_CMethodDef R_FortranMethodDef;
41
    const char *name;
-
 
42
    DL_FUNC     fun;
-
 
43
    int         numArgs;
-
 
44
 
65
 
45
} R_FortranMethodDef;
-
 
46
 
66
 
47
typedef struct {
-
 
48
    const char *name;
-
 
49
    DL_FUNC     fun;
-
 
50
    int         numArgs;
-
 
51
} R_CallMethodDef;
-
 
52
 
67
 
53
typedef struct {
68
typedef struct {
54
    const char *name;
69
    const char *name;
55
    DL_FUNC     fun;
70
    DL_FUNC     fun;
56
    int         numArgs;
71
    int         numArgs;
-
 
72
/* In the future, we will put types in here for the different arguments.
-
 
73
   We need a richer type system to do this effectively so that one
-
 
74
   can specify types for new classes.
-
 
75
*/
57
} R_ExternalMethodDef;
76
} R_CallMethodDef;
-
 
77
typedef R_CallMethodDef R_ExternalMethodDef;
58
 
78
 
59
 
79
 
60
typedef struct _DllInfo DllInfo;
80
typedef struct _DllInfo DllInfo;
61
 
81
 
62
/* 
82
/*