Skip to content

Conversation

@stenlarsson
Copy link
Contributor

@stenlarsson stenlarsson commented Dec 14, 2025

Rationale for this change

The ZeroFillOptions class is not available in GLib/Ruby, and it is used together with the utf8_zero_fill compute function.

What changes are included in this PR?

This adds the ZeroFillOptions class to GLib.

Are these changes tested?

Yes, with Ruby unit tests.

Are there any user-facing changes?

Yes, a new class.

@stenlarsson stenlarsson requested a review from kou as a code owner December 14, 2025 16:04
@github-actions
Copy link

⚠️ GitHub issue #48512 has been automatically assigned in GitHub to PR creator.

Comment on lines 7140 to 7147
{
const gchar *padding = g_value_get_string(value);
if (priv->padding) {
g_free(priv->padding);
}
priv->padding = g_strdup(padding);
options->padding = padding ? padding : "";
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we simplify this?

Suggested change
{
const gchar *padding = g_value_get_string(value);
if (priv->padding) {
g_free(priv->padding);
}
priv->padding = g_strdup(padding);
options->padding = padding ? padding : "";
}
options->padding = g_value_get_string(value);

Copy link
Contributor Author

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.

@stenlarsson stenlarsson force-pushed the glib-zero-fill-options branch from 8f85776 to 2b080c0 Compare December 31, 2025 09:35
@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Dec 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants