[Xts-commits] r801 - pkg/xts/inst/include
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Feb 12 23:46:07 CET 2014
Author: edd
Date: 2014-02-12 23:46:06 +0100 (Wed, 12 Feb 2014)
New Revision: 801
Modified:
pkg/xts/inst/include/xtsAPI.h
Log:
minor simplification in xtsAPI.h
Modified: pkg/xts/inst/include/xtsAPI.h
===================================================================
--- pkg/xts/inst/include/xtsAPI.h 2014-01-07 03:06:39 UTC (rev 800)
+++ pkg/xts/inst/include/xtsAPI.h 2014-02-12 22:46:06 UTC (rev 801)
@@ -6,8 +6,8 @@
any user comments and bug reports are very
welcomed.
-Copyright 2008 - 2013 Jeffrey A. Ryan
-Copyright 2013 Dirk Eddelbuettel
+Copyright 2008 - 2014 Jeffrey A. Ryan
+Copyright 2013 - 2014 2013 Dirk Eddelbuettel
This source is distributed with the same license
as the full xts software, GPL (>= 2).
@@ -43,96 +43,71 @@
*/
int attribute_hidden xtsIs(SEXP x)
{
- static int(*fun)(SEXP) = NULL;
- if(fun == NULL)
- fun = (int(*)(SEXP)) R_GetCCallable("xts","isXts");
+ static int(*fun)(SEXP) = (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) = NULL;
- if(fun == NULL)
- fun = (SEXP(*)(SEXP,SEXP,SEXP)) R_GetCCallable("xts","do_is_ordered");
+ static SEXP(*fun)(SEXP,SEXP,SEXP) = (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) = NULL;
- if(fun == NULL)
- fun = (SEXP(*)(SEXP,SEXP)) R_GetCCallable("xts","naCheck");
+ static SEXP(*fun)(SEXP,SEXP) = (SEXP(*)(SEXP,SEXP)) R_GetCCallable("xts","naCheck");
return fun(x, check);
}
SEXP attribute_hidden xtsTry(SEXP x) {
- static SEXP(*fun)(SEXP) = NULL;
- if (fun == NULL)
- fun = (SEXP(*)(SEXP)) R_GetCCallable("xts","tryXts");
+ static SEXP(*fun)(SEXP) = (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) = NULL;
- if (fun == NULL)
- fun = (SEXP(*)(SEXP,SEXP,SEXP)) R_GetCCallable("xts","do_rbind_xts");
+ static SEXP(*fun)(SEXP, SEXP, SEXP) = (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) = NULL;
- if (fun == NULL)
- fun = (SEXP(*)(SEXP)) R_GetCCallable("xts","coredata_xts");
+ static SEXP(*fun)(SEXP) = (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) = NULL;
- if (fun == NULL)
- fun = (SEXP(*)(SEXP,SEXP,SEXP)) R_GetCCallable("xts","lagXts");
+ static SEXP(*fun)(SEXP,SEXP,SEXP) = (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) = NULL;
- if (fun == NULL)
- fun = (SEXP(*)(SEXP,SEXP)) R_GetCCallable("xts","make_index_unique");
+ static SEXP(*fun)(SEXP,SEXP) = (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) = NULL;
- if (fun == NULL)
- fun = (SEXP(*)(SEXP,SEXP)) R_GetCCallable("xts","make_unique");
+ static SEXP(*fun)(SEXP,SEXP) = (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) = NULL;
- if (fun == NULL)
- fun = (SEXP(*)(SEXP,SEXP,SEXP,SEXP)) R_GetCCallable("xts","endpoints");
+ static SEXP(*fun)(SEXP,SEXP,SEXP,SEXP) = (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) = NULL;
- if (fun == NULL)
- fun = (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) =
+ (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) = NULL;
- if (fun == NULL)
- fun = (SEXP(*)(SEXP)) R_GetCCallable("xts","na_omit_xts");
+ static SEXP(*fun)(SEXP) = (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) = NULL;
- if (fun == NULL)
- fun = (SEXP(*)(SEXP,SEXP,SEXP,SEXP)) R_GetCCallable("xts","na_locf");
+ static SEXP(*fun)(SEXP,SEXP,SEXP,SEXP) = (SEXP(*)(SEXP,SEXP,SEXP,SEXP)) R_GetCCallable("xts","na_locf");
return fun(x, fromLast, maxgap, limit);
}
More information about the Xts-commits
mailing list