Skip to content

Conversation

@shiro615
Copy link
Contributor

@shiro615 shiro615 commented Jan 6, 2019

This is follow-up of #3197 (review)

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

Thanks!
Can you check my comments?

auto arrow_field = arrow_column->field();
return garrow_field_new_raw(&arrow_field);
return garrow_field_new_raw(&arrow_field,
garrow_column_get_data_type(column));
Copy link
Member

Choose a reason for hiding this comment

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

We need to call g_object_unref() for GArrowDataType * returned by garrow_column_get_data_type(). Because garrow_column_get_data_type() creates a new GArrowDataType.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've fixed it.

* @field: A #GArrowField.
*
* Returns: (transfer full): The data type of the field.
* Returns: (transfer none): The data type of the field.
Copy link
Member

Choose a reason for hiding this comment

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

This breaks backward compatibility for C API users (not for GObject Introspection based bindings users).
Normally, it's not desired. But we can accept this for this case because users who use this function may not exist.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see.

auto field = garrow_field_new_raw(&arrow_field);
auto field = garrow_field_new_raw(&arrow_field,
GARROW_DATA_TYPE(list_data_type));

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 reuse GARROW_DATA_TYPE(list_data_type) result for garrow_data_type_get_raw(GARROW_DATA_TYPE(list_data_type))?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've reused GARROW_DATA_TYPE(list_data_type).

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1
I'll merge this when CI is passed.

@kou kou closed this in 1eec9e8 Jan 7, 2019
@shiro615 shiro615 deleted the glib-use-property-to-keep-data-type branch January 7, 2019 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants