Skip to content
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

Introduce class and module tye check macro #7172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

S-H-GAMELINKS
Copy link
Contributor

Some codes check to Class(IClass) or Module type in Ruby.

(!RB_TYPE_P(obj, T_CLASS) && !RB_TYPE_P(obj, T_MODULE))

But, I though better and more shoter to using these type check macro.

#define RB_CLASS_TYPE_P(x) RB_TYPE_P((x), T_CLASS)
#define RB_MODULE_TYPE_P(x) RB_TYPE_P((x), T_MODULE)
#define RB_ICLASS_TYPE_P(x) RB_TYPE_P((x), T_ICLASS)

@S-H-GAMELINKS S-H-GAMELINKS force-pushed the introduce/class_module_type_macro branch from e4ee0fc to edc6dda Compare January 22, 2023 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant