/usr/lib/R/site-library/Biostrings/include/_Biostrings_stubs.c is in r-bioc-biostrings 2.38.0-1.
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 | #include "Biostrings_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("Biostrings", "_" #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("Biostrings", "_" #stubname); \
fun args; \
return; \
}
/*
* Stubs for callables defined in XString_class.c
*/
DEFINE_CCALLABLE_STUB(char, DNAencode,
(char c),
( c)
)
DEFINE_CCALLABLE_STUB(char, DNAdecode,
(char code),
( code)
)
DEFINE_CCALLABLE_STUB(char, RNAencode,
(char c),
( c)
)
DEFINE_CCALLABLE_STUB(char, RNAdecode,
(char code),
( code)
)
/*
* Stubs for callables defined in XStringSet_class.c
*/
DEFINE_CCALLABLE_STUB(int, get_XStringSet_length,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(const char *, get_XStringSet_xsbaseclassname,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(XStringSet_holder, hold_XStringSet,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(int, get_length_from_XStringSet_holder,
(const XStringSet_holder *x_holder),
( x_holder)
)
DEFINE_CCALLABLE_STUB(Chars_holder, get_elt_from_XStringSet_holder,
(const XStringSet_holder *x_holder, int i),
( x_holder, i)
)
DEFINE_CCALLABLE_STUB(XStringSet_holder, get_linear_subset_from_XStringSet_holder,
(const XStringSet_holder *x_holder, int offset, int length),
( x_holder, offset, length)
)
DEFINE_NOVALUE_CCALLABLE_STUB(set_XStringSet_names,
(SEXP x, SEXP names),
( x, names)
)
/*
* Stubs for callables defined in XStringSetList_class.c
*/
DEFINE_CCALLABLE_STUB(XStringSetList_holder, hold_XStringSetList,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(int, get_length_from_XStringSetList_holder,
(const XStringSetList_holder *x_holder),
( x_holder)
)
DEFINE_CCALLABLE_STUB(XStringSet_holder, get_elt_from_XStringSetList_holder,
(const XStringSetList_holder *x_holder, int i),
( x_holder, i)
)
/*
* Stubs for callables defined in match_reporting.c
*/
DEFINE_NOVALUE_CCALLABLE_STUB(init_match_reporting,
(const char *ms_mode, int nPSpair),
( ms_mode, nPSpair)
)
DEFINE_NOVALUE_CCALLABLE_STUB(set_active_PSpair,
(int PSpair_id),
( PSpair_id)
)
DEFINE_NOVALUE_CCALLABLE_STUB(set_match_shift,
(int shift),
( shift)
)
DEFINE_NOVALUE_CCALLABLE_STUB(report_match,
(int start, int width),
( start, width)
)
DEFINE_NOVALUE_CCALLABLE_STUB(drop_reported_matches,
(),
()
)
DEFINE_CCALLABLE_STUB(int, get_match_count,
(),
()
)
DEFINE_CCALLABLE_STUB(SEXP, reported_matches_asSEXP,
(),
()
)
/*
* Stubs for callables defined in MIndex_class.c
*/
DEFINE_CCALLABLE_STUB(MIndex_holder, hold_MIndex,
(SEXP x),
( x)
)
DEFINE_CCALLABLE_STUB(int, get_length_from_MIndex_holder,
(const MIndex_holder *x_holder),
( x_holder)
)
DEFINE_CCALLABLE_STUB(int, get_width0_elt_from_MIndex_holder,
(const MIndex_holder *x_holder, int i),
( x_holder, i)
)
DEFINE_CCALLABLE_STUB(IRanges_holder, get_elt_from_MIndex_holder,
(const MIndex_holder *x_holder, int i),
( x_holder, i)
)
/*
* Stubs for callables defined in match_pattern_boyermoore.c
*/
DEFINE_CCALLABLE_STUB(int, match_pattern_boyermoore,
(const Chars_holder *P, const Chars_holder *S, int nfirstmatches, int walk_backward),
( P, S, nfirstmatches, walk_backward)
)
|