[Xts-commits] r804 - pkg/xts/inst/include
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat May 17 23:03:47 CEST 2014
Author: edd
Date: 2014-05-17 23:03:47 +0200 (Sat, 17 May 2014)
New Revision: 804
Modified:
pkg/xts/inst/include/xtsAPI.h
Log:
revert compact initialization back to more explicit form to make gcc happy
Modified: pkg/xts/inst/include/xtsAPI.h
===================================================================
--- pkg/xts/inst/include/xtsAPI.h 2014-03-19 15:14:12 UTC (rev 803)
+++ pkg/xts/inst/include/xtsAPI.h 2014-05-17 21:03:47 UTC (rev 804)
@@ -7,7 +7,7 @@
welcomed.
Copyright 2008 - 2014 Jeffrey A. Ryan
-Copyright 2013 - 2014 Dirk Eddelbuettel
+Copyright 2014 Dirk Eddelbuettel
This source is distributed with the same license
as the full xts software, GPL (>= 2).
@@ -43,71 +43,84 @@
*/
int attribute_hidden xtsIs(SEXP x)
{
- static int(*fun)(SEXP) = (int(*)(SEXP)) R_GetCCallable("xts","isXts");
+ static int(*fun)(SEXP) = NULL;
+ if (fun == NULL) fun = (int(*)(SEXP)) R_GetCCallable("xts","isXts");
return fun(x);
}
SEXP attribute_hidden xtsIsOrdered(SEXP x, SEXP increasing, SEXP strictly)
{
- static SEXP(*fun)(SEXP,SEXP,SEXP) = (SEXP(*)(SEXP,SEXP,SEXP)) R_GetCCallable("xts","do_is_ordered");
+ static SEXP(*fun)(SEXP,SEXP,SEXP) = NULL;
+ if (fun == NULL) fun = (SEXP(*)(SEXP,SEXP,SEXP)) R_GetCCallable("xts","do_is_ordered");
return fun(x, increasing, strictly);
}
SEXP attribute_hidden xtsNaCheck(SEXP x, SEXP check)
{
- static SEXP(*fun)(SEXP,SEXP) = (SEXP(*)(SEXP,SEXP)) R_GetCCallable("xts","naCheck");
+ static SEXP(*fun)(SEXP,SEXP) = NULL;
+ if (fun == NULL) fun = (SEXP(*)(SEXP,SEXP)) R_GetCCallable("xts","naCheck");
return fun(x, check);
}
SEXP attribute_hidden xtsTry(SEXP x) {
- static SEXP(*fun)(SEXP) = (SEXP(*)(SEXP)) R_GetCCallable("xts","tryXts");
+ static SEXP(*fun)(SEXP) = NULL;
+ if (fun == NULL) fun = (SEXP(*)(SEXP)) R_GetCCallable("xts","tryXts");
return fun(x);
}
SEXP attribute_hidden xtsRbind(SEXP x, SEXP y, SEXP dup) {
- static SEXP(*fun)(SEXP, SEXP, SEXP) = (SEXP(*)(SEXP,SEXP,SEXP)) R_GetCCallable("xts","do_rbind_xts");
+ static SEXP(*fun)(SEXP, SEXP, SEXP) = NULL;
+ if (fun == NULL) fun = (SEXP(*)(SEXP,SEXP,SEXP)) R_GetCCallable("xts","do_rbind_xts");
return fun(x, y, dup);
}
SEXP attribute_hidden xtsCoredata(SEXP x) {
- static SEXP(*fun)(SEXP) = (SEXP(*)(SEXP)) R_GetCCallable("xts","coredata_xts");
+ static SEXP(*fun)(SEXP) = NULL;
+ if (fun == NULL) fun = (SEXP(*)(SEXP)) R_GetCCallable("xts","coredata_xts");
return fun(x);
}
SEXP attribute_hidden xtsLag(SEXP x, SEXP k, SEXP pad) {
- static SEXP(*fun)(SEXP,SEXP,SEXP) = (SEXP(*)(SEXP,SEXP,SEXP)) R_GetCCallable("xts","lagXts");
+ static SEXP(*fun)(SEXP,SEXP,SEXP) = NULL;
+ if (fun == NULL) fun = (SEXP(*)(SEXP,SEXP,SEXP)) R_GetCCallable("xts","lagXts");
return fun(x, k, pad);
}
SEXP attribute_hidden xtsMakeIndexUnique(SEXP x, SEXP eps) {
- static SEXP(*fun)(SEXP,SEXP) = (SEXP(*)(SEXP,SEXP)) R_GetCCallable("xts","make_index_unique");
+ static SEXP(*fun)(SEXP,SEXP) = NULL;
+ if (fun == NULL) fun = (SEXP(*)(SEXP,SEXP)) R_GetCCallable("xts","make_index_unique");
return fun(x, eps);
}
SEXP attribute_hidden xtsMakeUnique(SEXP x, SEXP eps) {
- static SEXP(*fun)(SEXP,SEXP) = (SEXP(*)(SEXP,SEXP)) R_GetCCallable("xts","make_unique");
+ static SEXP(*fun)(SEXP,SEXP) = NULL;
+ if (fun == NULL) fun = (SEXP(*)(SEXP,SEXP)) R_GetCCallable("xts","make_unique");
return fun(x, eps);
}
SEXP attribute_hidden xtsEndpoints(SEXP x, SEXP on, SEXP k, SEXP addlast) {
- static SEXP(*fun)(SEXP,SEXP,SEXP,SEXP) = (SEXP(*)(SEXP,SEXP,SEXP,SEXP)) R_GetCCallable("xts","endpoints");
+ static SEXP(*fun)(SEXP,SEXP,SEXP,SEXP) = NULL;
+ if (fun == NULL) fun = (SEXP(*)(SEXP,SEXP,SEXP,SEXP)) R_GetCCallable("xts","endpoints");
return fun(x, on, k, addlast);
}
SEXP attribute_hidden xtsMerge(SEXP x, SEXP y, SEXP all, SEXP fill, SEXP retclass,
SEXP colnames, SEXP suffixes, SEXP retside, SEXP env, int coerce) {
- static SEXP(*fun)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,int) =
- (SEXP(*)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,int)) R_GetCCallable("xts","do_merge_xts");
+ static SEXP(*fun)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,int) = NULL;
+ if (fun == NULL)
+ fun = (SEXP(*)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,int)) R_GetCCallable("xts","do_merge_xts");
return fun(x, y, all, fill, retclass, colnames, suffixes, retside, env, coerce);
}
SEXP attribute_hidden xtsNaOmit(SEXP x) {
- static SEXP(*fun)(SEXP) = (SEXP(*)(SEXP)) R_GetCCallable("xts","na_omit_xts");
+ static SEXP(*fun)(SEXP) = NULL;
+ if (fun == NULL) fun = (SEXP(*)(SEXP)) R_GetCCallable("xts","na_omit_xts");
return fun(x);
}
SEXP attribute_hidden xtsNaLocf(SEXP x, SEXP fromLast, SEXP maxgap, SEXP limit) {
- static SEXP(*fun)(SEXP,SEXP,SEXP,SEXP) = (SEXP(*)(SEXP,SEXP,SEXP,SEXP)) R_GetCCallable("xts","na_locf");
+ static SEXP(*fun)(SEXP,SEXP,SEXP,SEXP) = NULL;
+ if (fun == NULL) fun = (SEXP(*)(SEXP,SEXP,SEXP,SEXP)) R_GetCCallable("xts","na_locf");
return fun(x, fromLast, maxgap, limit);
}
More information about the Xts-commits
mailing list