/usr/lib/R/site-library/IRanges/include/_IRanges_stubs.c is in r-bioc-iranges 2.8.1-1+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | #include "IRanges_interface.h"
#define DEFINE_CCALLABLE_STUB(retT, stubname, Targs, args) \
typedef retT(*__ ## stubname ## _funtype__)Targs; \
retT stubname Targs \
{ \
static __ ## stubname ## _funtype__ fun = NULL; \
if (fun == NULL) \
fun = (__ ## stubname ## _funtype__) R_GetCCallable("IRanges", "_" #stubname); \
return fun args; \
}
/*
* Using the above macro when retT (the returned type) is void will make Sun
* Studio 12 C compiler unhappy. So we need to use the following macro to
* handle that case.
*/
#define DEFINE_NOVALUE_CCALLABLE_STUB(stubname, Targs, args) \
typedef void(*__ ## stubname ## _funtype__)Targs; \
void stubname Targs \
{ \
static __ ## stubname ## _funtype__ fun = NULL; \
if (fun == NULL) \
fun = (__ ## stubname ## _funtype__) R_GetCCallable("IRanges", "_" #stubname); \
fun args; \
return; \
}
/*
* Stubs for callables defined in Ranges_comparison.c
*/
DEFINE_CCALLABLE_STUB(int, overlap_code,
(int x_start, int x_width, int y_start, int y_width),
( x_start, x_width, y_start, y_width)
)
DEFINE_CCALLABLE_STUB(int, invert_overlap_code,
(int code),
( code)
)
/*
* Stubs for callables defined in IRanges_class.c
*/
DEFINE_CCALLABLE_STUB(SEXP, get_IRanges_start,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(SEXP, get_IRanges_width,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(SEXP, get_IRanges_names,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(int, get_IRanges_length,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(IRanges_holder, hold_IRanges,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(int, get_length_from_IRanges_holder,
(const IRanges_holder *x_holder),
( x_holder)
)
DEFINE_CCALLABLE_STUB(int, get_width_elt_from_IRanges_holder,
(const IRanges_holder *x_holder, int i),
( x_holder, i)
)
DEFINE_CCALLABLE_STUB(int, get_start_elt_from_IRanges_holder,
(const IRanges_holder *x_holder, int i),
( x_holder, i)
)
DEFINE_CCALLABLE_STUB(int, get_end_elt_from_IRanges_holder,
(const IRanges_holder *x_holder, int i),
( x_holder, i)
)
DEFINE_CCALLABLE_STUB(SEXP, get_names_elt_from_IRanges_holder,
(const IRanges_holder *x_holder, int i),
( x_holder, i)
)
DEFINE_CCALLABLE_STUB(IRanges_holder, get_linear_subset_from_IRanges_holder,
(const IRanges_holder *x_holder, int offset, int length),
( x_holder, offset, length)
)
DEFINE_NOVALUE_CCALLABLE_STUB(set_IRanges_names,
(SEXP x, SEXP names),
( x, names)
)
DEFINE_NOVALUE_CCALLABLE_STUB(copy_IRanges_slots,
(SEXP x, SEXP x0),
( x, x0)
)
DEFINE_CCALLABLE_STUB(SEXP, new_IRanges,
(const char *classname, SEXP start, SEXP width, SEXP names),
( classname, start, width, names)
)
DEFINE_CCALLABLE_STUB(SEXP, new_IRanges_from_IntPairAE,
(const char *classname, const IntPairAE *intpair_ae),
( classname, intpair_ae)
)
DEFINE_CCALLABLE_STUB(SEXP, new_list_of_IRanges_from_IntPairAEAE,
(const char *element_type, const IntPairAEAE *intpair_aeae),
( element_type, intpair_aeae)
)
DEFINE_CCALLABLE_STUB(SEXP, alloc_IRanges,
(const char *classname, int length),
( classname, length)
)
/*
* Stubs for callables defined in Grouping_class.c
*/
DEFINE_CCALLABLE_STUB(SEXP, get_H2LGrouping_high2low,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(SEXP, get_H2LGrouping_low2high,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(SEXP, get_Partitioning_names,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(SEXP, get_PartitioningByEnd_end,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(SEXP, new_PartitioningByEnd,
(const char *classname, SEXP end, SEXP names),
( classname, end, names)
)
/*
* Stubs for callables defined in CompressedList_class.c
*/
DEFINE_CCALLABLE_STUB(SEXP, get_CompressedList_unlistData,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(SEXP, get_CompressedList_partitioning,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(int, get_CompressedList_length,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(SEXP, get_CompressedList_names,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(SEXP, new_CompressedList,
(const char *classname, SEXP unlistData, SEXP partitioning),
( classname, unlistData, partitioning)
)
DEFINE_CCALLABLE_STUB(CompressedIntsList_holder, hold_CompressedIntegerList,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(int, get_length_from_CompressedIntsList_holder,
(const CompressedIntsList_holder *x_holder),
( x_holder)
)
DEFINE_CCALLABLE_STUB(Ints_holder, get_elt_from_CompressedIntsList_holder,
(const CompressedIntsList_holder *x_holder, int i),
( x_holder, i)
)
/*
* Stubs for callables defined in CompressedIRangesList_class.c
*/
DEFINE_CCALLABLE_STUB(CompressedIRangesList_holder, hold_CompressedIRangesList,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(int, get_length_from_CompressedIRangesList_holder,
(const CompressedIRangesList_holder *x_holder),
( x_holder)
)
DEFINE_CCALLABLE_STUB(IRanges_holder, get_elt_from_CompressedIRangesList_holder,
(const CompressedIRangesList_holder *x_holder, int i),
( x_holder, i)
)
DEFINE_CCALLABLE_STUB(int, get_eltNROWS_from_CompressedIRangesList_holder,
(const CompressedIRangesList_holder *x_holder, int i),
( x_holder, i)
)
|