-
Notifications
You must be signed in to change notification settings - Fork 30
Eliminate ATTRIB() use
#87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Copying the pattern from tidyverse/dplyr#7797
compile_commands.json
Outdated
| @@ -0,0 +1,22 @@ | |||
| [ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I supposed to gitignore this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep these commands are specific to your setup
tests/testthat/_snaps/sxp.md
Outdated
| [1] <INTSXP[10]> (altrep ) | ||
| _class [2] <RAWSXP[144]> () | ||
| _attrib [3] <LISTSXP> () | ||
| _attrib [3] <VECSXP[3]> () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically a regression, but I'm fine with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm it'd be very confusing for such a low level inspection tool to misrepresent data structures involved.
But that was an easy fix (just collect in a pairlist), I just pushed it.
lionel-
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG!
| // CHARSXPs have fake attributes | ||
| if (TYPEOF(x) != CHARSXP ) | ||
| size += obj_size_tree(ATTRIB(x), base_env, sizeof_node, sizeof_vector, seen, depth + 1); | ||
| if (TYPEOF(x) != CHARSXP && ANY_ATTRIB(x)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we have collect_attribs() should we just use it here? Probably a little bit less efficient but that's unlikely to matter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea!
|
Thanks! |
Copying the pattern from tidyverse/dplyr#7797