-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-48500: [GLib][Ruby] Add ReplaceSliceOptions #48521
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 *replacement = g_value_get_string(value); | ||
| if (priv->replacement) { | ||
| g_free(priv->replacement); | ||
| } | ||
| priv->replacement = g_strdup(replacement); | ||
| options->replacement = replacement ? replacement : ""; |
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.
Why do we need priv->replacement?
It seems that we can just use options->replacement = 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.
Thanks, that simplifies the implementation.
abdf3bd to
4230f0e
Compare
kou
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.
+1
Rationale for this change
The
ReplaceSliceOptionsclass is not available in GLib/Ruby, and it is used together with theutf8_replace_slicecompute function.What changes are included in this PR?
This adds the
ReplaceSliceOptionsclass to GLib.Are these changes tested?
Yes, with Ruby unit tests.
Are there any user-facing changes?
Yes, a new class.