-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-48509: [GLib][Ruby] Add TrimOptions #48530
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: main
Are you sure you want to change the base?
Conversation
|
|
c_glib/arrow-glib/compute.cpp
Outdated
| { | ||
| const gchar *characters = g_value_get_string(value); | ||
| if (priv->characters) { | ||
| g_free(priv->characters); | ||
| } | ||
| priv->characters = g_strdup(characters); | ||
| options->characters = characters ? characters : ""; | ||
| } |
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.
Can we simplify this?
| { | |
| const gchar *characters = g_value_get_string(value); | |
| if (priv->characters) { | |
| g_free(priv->characters); | |
| } | |
| priv->characters = g_strdup(characters); | |
| options->characters = characters ? characters : ""; | |
| } | |
| options->characters = g_value_get_string(value); |
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.
Yes, I don't know why I thought that was needed. I removed the whole private struct.
7493114 to
902a2d0
Compare
902a2d0 to
a0fd322
Compare
Rationale for this change
The
TrimOptionsclass is not available in GLib/Ruby, and it is used together with theutf8_trimcompute function.What changes are included in this PR?
This adds the
TrimOptionsclass to GLib.Are these changes tested?
Yes, with Ruby unit tests.
Are there any user-facing changes?
Yes, a new class.