Leonardo Silvestri
Leonardo Silvestri
@silentbits has a point though, at C level nanotime will look like a REALSXP. But in fact, behind the scenes, it's the 64-bit value of this floating point that will...
This is the function called by `Rf_asS4`: ``` r SEXP asS4(SEXP s, Rboolean flag, int complete) { if(flag == IS_S4_OBJECT(s)) return s; PROTECT(s); if(MAYBE_SHARED(s)) { s = shallow_duplicate(s); UNPROTECT(1); PROTECT(s);...
No, I meant: ``` r res = Rf_asS4(res, TRUE, FALSE); ``` instead of: ``` r Rf_asS4(res, TRUE, FALSE); ``` The latter works only if a shallow duplicate is not made....
All we want to do here is set the S4 bit on a newly created object; `SET_S4_OBJECT` is simply: ``` c #define SET_S4_OBJECT(x) (((x)->sxpinfo.gp) |= S4_OBJECT_MASK) ``` We are in...
So the reason `MAYBE_SHARED` returns true is that the ref count for the new object is indeed larger than 1. It doesn't really make sense because we've just allocated the...
Tried it and it works. That's probably the best solution. Will go ahead and commit this, do you want me to also fix the missing \ in the `\code{+}` hoping...
The name copying order also needs to be changed in `interval.cpp`. In `utilities.hpp` the order is unimportant. I've opened PR #121 for these changes. Maybe you can slip in there...
OK, I'll fix #117 tonight in a different PR and like that we can submit to CRAN only once. Without the change in `interval.cpp` things work, but then we get...
Yes, all this is strange. I'm taking a look.
So I can reproduce the error but the twist is that it only happens on the second function call. To recap, we have the following two S4 `Compare` functions for...