-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Add Set C-API #13735
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
base: master
Are you sure you want to change the base?
Add Set C-API #13735
Conversation
This comment has been minimized.
This comment has been minimized.
Should |
Yes, it should. I updated this to include that change. |
Headsup: I've exposed |
|
||
load_extension("set") | ||
|
||
describe "C-API Set function" do |
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.
Thank you for adding these C API specs, that will definitely help implementing those functions on other Rubies.
These functions conflict with the planned C-API functions. Since they deal with the underlying set_table pointers and not Set instances, this seems like a more accurate name as well.
Rebased and updated to remove it from |
This should be a minimal C-API needed to deal with Set objects. It supports creating the sets, checking whether an element is the set, adding and removing elements, iterating over the elements, clearing a set, and returning the size of the set. Co-authored-by: Nobuyoshi Nakada <nobu.nakada@gmail.com>
This should be a minimal C-API needed to deal with Set objects. It
supports creating the sets, checking whether an element is the set,
adding and removing elements, iterating over the elements, clearing
a set, and returning the size of the set.
As some of the function names I wanted to use in the C-API were
already used internally, I had to rename some existing internal functions.