Displaying 20 results from an estimated 56 matches for "attribute_hidden".
2019 Jun 04
2
undefined symbol errors when compiling package using ALTREP API
...ravis build:
https://travis-ci.org/fstpackage/lazyvec/jobs/539442806
The reason of build failure is that many ALTREP methods generate 'undefined
symbol' errors upon building the package (on Linux). I've checked the R
source code and the undefined symbols seems to be related to the
'attribute_hidden' before the function definition. For example, the method
'ALTVEC_EXTRACT_SUBSET' is defined as:
SEXP attribute_hidden ALTVEC_EXTRACT_SUBSET(SEXP x, SEXP indx, SEXP call)
My question is why these differences between Windows / OSX and Linux exist
and if they are intentional?
Do I need s...
2010 Mar 05
2
[PATCH] R ignores PATH_MAX and fails in long directories (PR#14228)
...se branch :
http://people.FreeBSD.org/~murray/maxpath-svn-2-10-branch.patch
Trunk patch pasted below :
Index: src/unix/sys-unix.c
===================================================================
--- src/unix/sys-unix.c (revision 51208)
+++ src/unix/sys-unix.c (working copy)
@@ -61,7 +61,7 @@
attribute_hidden
FILE *R_OpenInitFile(void)
{
- char buf[256], *home, *p = getenv("R_PROFILE_USER");
+ char buf[PATH_MAX], *home, *p = getenv("R_PROFILE_USER");
FILE *fp;
fp = NULL;
@@ -72,7 +72,7 @@
return fp;
if((home = getenv("HOME")) == NULL)...
2009 Mar 19
1
.Internal
...st(maximum = val, objective = f(val, ...))
}
else {
val <- .Internal(fmin(function(arg) f(arg, ...), lower,
upper, tol))
list(minimum = val, objective = f(val, ...))
}
}
Then I did a search for fmin and i came up with:
/* fmin(f, xmin, xmax tol) */
SEXP attribute_hidden do_fmin(SEXP call, SEXP op, SEXP args, SEXP rho)
So my question is where do I find the intermediary step between
.Internal(fmin(function(arg) f(arg, ...), lower, upper, tol))
and
SEXP attribute_hidden do_fmin(SEXP call, SEXP op, SEXP args, SEXP rho)
The number of arguments doesn't match...
2019 Jun 04
2
[External] undefined symbol errors when compiling package using ALTREP API
thanks for clearing that up, so these methods are actually not meant to be
exported on Windows and OSX?
Some of the ALTREP methods that now use 'attribute_hidden' would be very
useful to packages that aim to be ALTREP aware, should the currently
(exported) API be considered final?
thanks for your time & best,
Mark
On Tue, Jun 4, 2019 at 6:52 PM Tierney, Luke <luke-tierney at uiowa.edu> wrote:
> On Tue, 4 Jun 2019, Mark Klik wrote:
>...
2012 Dec 15
1
Could Rstd_Busy do something (src/unix/sys-std.c)?
Currently the function Rstd_Busy() does nothing (src/unix/sys-std.c):
void attribute_hidden Rstd_Busy(int which)
{
}
The function is called through a pointer and R interfaces can change
this pointer and, thus, use a different function. I don't plan to
create a whole new interface to R, but I maintain a package whose aim
is to provide a new feature to R when it's running i...
2010 Nov 02
2
on the usage of do.call
...envir))
}
<environment: namespace:base>
>
In <src>/main/names.c, the function do.call is linked to the C function
do_docall (line 499). (.Internal calls the good function line 1194.)
And the do_docall function is defined in <src>/main/coerce.c line 2217 and
declared as
SEXP attribute_hidden do_docall(SEXP call, SEXP op, SEXP args, SEXP rho)
in Internal.h.
The problem is that I do not guess the exact meaning of theses arguments,
and the header file Internal.h is not found when included in my C file.
As this header is not listed in R-exts.pdf section 6.17, I think I cannot
use the do_...
2024 Apr 14
1
Calling applyClosure from a package?
Hi,
Short version of my question: Rf_applyClosure was marked
attribute_hidden in Oct 2023, and I am curious why and if there is an
alternative interface to it planned.
Long version:
I have been toying with building a package that makes it easier to do
non-standard evaluation directly using promises, rather than wrapping
these in a custom type (like e.g. rlang does). The ad...
2019 Jun 04
2
[External] undefined symbol errors when compiling package using ALTREP API
...added.
>
> Best,
> ~G
>
> On Tue, Jun 4, 2019 at 2:22 PM Mark Klik <markklik at gmail.com> wrote:
>
>> thanks for clearing that up, so these methods are actually not meant to be
>> exported on Windows and OSX?
>> Some of the ALTREP methods that now use 'attribute_hidden' would be very
>> useful to packages that aim to be ALTREP aware, should the currently
>> (exported) API be considered final?
>>
>> thanks for your time & best,
>> Mark
>>
>> On Tue, Jun 4, 2019 at 6:52 PM Tierney, Luke <luke-tierney at uiowa.ed...
2019 Jul 13
2
Mitigating Stalls Caused by Call Deparse on Error
...rsed(0));
??? ???? SET_SYMVALUE(install(".Traceback"), s);
??? ???? /* should have been defineVar
??? ??????? setVar(install(".Traceback"), s, R_GlobalEnv); */
@@ -1440,9 +1440,11 @@
??? ?PrintWarnings();
???? }
?}
-
+/*
+ * Return the traceback without deparsing the calls
+ */
?attribute_hidden
-SEXP R_GetTraceback(int skip)
+SEXP R_GetTracebackParsed(int skip)
?{
???? int nback = 0, ns;
???? RCNTXT *c;
@@ -1467,7 +1469,9 @@
??? ???? if (skip > 0)
??? ??? ?skip--;
??? ???? else {
-?? ??? ?SETCAR(t, deparse1m(c->call, 0, DEFAULTDEPARSE));
+??????????????? // Extra paranoid PROTECTS
+...
2023 Feb 11
1
scan(..., skip=1e11): infinite loop; cannot interrupt
...e outer loop doesn't check for EOF and keeps
asking for more characters until the inner loop runs at least once for
every line it wants to skip. The following patch should avoid the
wait in such cases:
--- src/main/scan.c (revision 83797)
+++ src/main/scan.c (working copy)
@@ -835,7 +835,7 @@
attribute_hidden SEXP do_scan(SEXP call, SEXP op, SEXP args, SEXP rho)
{
SEXP ans, file, sep, what, stripwhite, dec, quotes, comstr;
- int c, flush, fill, blskip, multiline, escapes, skipNul;
+ int c = 0, flush, fill, blskip, multiline, escapes, skipNul;
R_xlen_t nmax, nlines, nskip;
const cha...
2010 Aug 21
1
Speed improvement to evalList
...--------------------------------------
/* Used in eval and applyMethod (object.c) for builtin primitives,
do_internal (names.c) for builtin .Internals
and in evalArgs.
'n' is the number of arguments already evaluated and hence not
passed to evalArgs and hence to here.
*/
SEXP attribute_hidden evalList(SEXP el, SEXP rho, SEXP call, int n)
{
SEXP head, tail, ev, h;
int mode; /* mode==0 is 0 args, mode==1 is 1 arg, mode==2 is >1 arg */
head = R_NilValue;
mode = 0;
while (el != R_NilValue) {
n++;
if (CAR(el) == R_DotsSymbol) {
/* If we have a ... symbol,...
2019 Jun 04
0
[External] undefined symbol errors when compiling package using ALTREP API
...ultimately result in the method being
added.
Best,
~G
On Tue, Jun 4, 2019 at 2:22 PM Mark Klik <markklik at gmail.com> wrote:
> thanks for clearing that up, so these methods are actually not meant to be
> exported on Windows and OSX?
> Some of the ALTREP methods that now use 'attribute_hidden' would be very
> useful to packages that aim to be ALTREP aware, should the currently
> (exported) API be considered final?
>
> thanks for your time & best,
> Mark
>
> On Tue, Jun 4, 2019 at 6:52 PM Tierney, Luke <luke-tierney at uiowa.edu>
> wrote:
>
>...
2009 May 23
2
as.numeric(levels(factor(x))) may be a decreasing sequence
...*p & *p <= '9') {
+ if (*(p++) != '0') {
+ replace = (char *) p;
+ }
+ }
+ while (*(replace++) = *(p++)) {
+ ;
+ }
+ break;
+ }
+ }
+ return s;
+}
+
SEXP attribute_hidden StringFromReal(double x, int *warn)
{
int w, d, e;
formatReal(&x, 1, &w, &d, &e, 0);
if (ISNA(x)) return NA_STRING;
- else return mkChar(EncodeReal(x, w, d, e, OutDec));
+ else return mkChar(elim_trailing(EncodeReal(x, w, d, e, OutDec), OutDec));
}
SEXP att...
2019 Jul 14
2
[External] Mitigating Stalls Caused by Call Deparse on Error
...k"), s);
> ??? ???? /* should have been defineVar
> ??? ??????? setVar(install(".Traceback"), s, R_GlobalEnv); */
> @@ -1440,9 +1440,11 @@
> ??? ?PrintWarnings();
> ???? }
> ?}
> -
> +/*
> + * Return the traceback without deparsing the calls
> + */
> ?attribute_hidden
> -SEXP R_GetTraceback(int skip)
> +SEXP R_GetTracebackParsed(int skip)
> ?{
> ???? int nback = 0, ns;
> ???? RCNTXT *c;
> @@ -1467,7 +1469,9 @@
> ??? ???? if (skip > 0)
> ??? ??? ?skip--;
> ??? ???? else {
> -?? ??? ?SETCAR(t, deparse1m(c->call, 0, DEFAULTDEPARS...
2016 Feb 09
0
Minor portability patch
...beginning of the string.
I have been told that it may result in undefined behaviour in some shells when
the string is empty.
If you wish, I will provide a patch for this as well.
--- src/main/character.c.orig 2016-02-03 01:59:38.000000000 +0000
+++ src/main/character.c
@@ -1561,7 +1561,7 @@ SEXP attribute_hidden do_strtrim(SEXP ca
return s;
}
-static int strtoi(SEXP s, int base)
+static int Strtoi(SEXP s, int base)
{
long int res;
char *endp;
@@ -1595,7 +1595,7 @@ SEXP attribute_hidden do_strtoi(SEXP cal
PROTECT(ans = allocVector(INTSXP, n = LENGTH(x)));
for(i = 0; i < n;...
2019 Jun 04
0
[External] undefined symbol errors when compiling package using ALTREP API
...vis-ci.org/fstpackage/lazyvec/jobs/539442806
>
> The reason of build failure is that many ALTREP methods generate 'undefined
> symbol' errors upon building the package (on Linux). I've checked the R
> source code and the undefined symbols seems to be related to the
> 'attribute_hidden' before the function definition. For example, the method
> 'ALTVEC_EXTRACT_SUBSET' is defined as:
>
> SEXP attribute_hidden ALTVEC_EXTRACT_SUBSET(SEXP x, SEXP indx, SEXP call)
>
> My question is why these differences between Windows / OSX and Linux exist
> and if they...
2020 Jan 20
1
Minor bug in error message in datetime.c
Hi,
I have spotted a minor bug in do_strptime() function. Here is a patch:
?--- a/src/main/datetime.c
+++ b/src/main/datetime.c
@@ -1048,7 +1048,7 @@ SEXP attribute_hidden do_strptime(SEXP call, SEXP op, SEXP args, SEXP env)
if(!isString((x = CAR(args))))
error(_("invalid '%s' argument"), "x");
if(!isString((sformat = CADR(args))) || XLENGTH(sformat) == 0)
- error(_("invalid '%s' argument"), &q...
2006 Oct 15
1
Feature request: names(someEnv) same as ls(someEnv)
Hi,
I would be nice if names() returned the equivalent of ls() for
environments.
--- a/src/main/attrib.c
+++ b/src/main/attrib.c
@@ -687,6 +687,8 @@ SEXP attribute_hidden do_names(SEXP call
s = CAR(args);
if (isVector(s) || isList(s) || isLanguage(s))
return getAttrib(s, R_NamesSymbol);
+ if (isEnvironment(s))
+ return R_lsInternal(s, 0);
return R_NilValue;
}
+ seth
--
Seth Falcon | Computational Biology | Fred Hutchinson Cancer...
2009 Mar 31
1
external equiv to R_serialize()?
I'm trying to efficiently allow conversion of R objects to PostgreSQL
bytea (raw binary) datatype within PL/R for persistent storage in
Postgres tables. I have found R_serialize() which looks like what I
need, -- e.g. R_serialize(object, NULL, FALSE, NULL) -- except that it
is marked attribute_hidden. Is there some other externally available
interface that I can use?
Thanks,
Joe
2010 May 24
1
Functioning and source code location of .Primitive()
Hi all.
I began examining the R source code in the last few days, for a better understanding of its structure. I read the manuals and digged deeply (maybe not enough?) into the source code, but I couldn't totally understand how .Primitive() works. Its effects, if I understand well, are quite clear to me (calling the C compiled counterpart of a "primitive" function), but where is its