Skip to content

Commit de798a7

Browse files
committed
remove typedef
1 parent 372250a commit de798a7

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ SEXP nano_unresolved;
5353

5454
SEXP nano_precious;
5555

56-
later_fun eln2;
56+
static void (*eln2)(void (*)(void *), void *, double, int);
5757

5858
void later2(void (*fun)(void *), void *data) {
5959
eln2(fun, data, 0, 0);
@@ -201,7 +201,7 @@ static const R_ExternalMethodDef externalMethods[] = {
201201
void attribute_visible R_init_nanonext(DllInfo* dll) {
202202
RegisterSymbols();
203203
PreserveObjects();
204-
eln2 = (later_fun) R_GetCCallable("later", "execLaterNative2");
204+
eln2 = (void (*)(void (*)(void *), void *, double, int)) R_GetCCallable("later", "execLaterNative2");
205205
R_registerRoutines(dll, NULL, callMethods, NULL, externalMethods);
206206
R_useDynamicSymbols(dll, FALSE);
207207
R_forceSymbols(dll, TRUE);

src/nanonext.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,7 @@ typedef struct nano_buf_s {
176176
size_t cur;
177177
} nano_buf;
178178

179-
typedef void (*later_fun)(void (*)(void *), void *, double, int);
180-
extern void later2(void (*)(void *), void *);
179+
void later2(void (*)(void *), void *);
181180

182181
SEXP nano_PreserveObject(SEXP);
183182
void nano_ReleaseObject(SEXP);

0 commit comments

Comments
 (0)