Skip to content

Commit

Permalink
GH-45354: [GLib] Fix garrow_record_batch_validate() definied location (
Browse files Browse the repository at this point in the history
…#45355)

### Rationale for this change

#45353 implemented `garrow_record_batch_validate()` method. But it was the incorrect location.
We need to move the code location to use it as a C API.

### What changes are included in this PR?

Move the `garrow_record_batch_validate()` location between `G_BEGIN_DECLS` and `G_END_DECLS`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.

* GitHub Issue: #45354

Authored-by: Hiroyuki Sato <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
  • Loading branch information
hiroyuki-sato authored Jan 27, 2025
1 parent be38880 commit 4408e2b
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions c_glib/arrow-glib/record-batch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,22 @@ garrow_record_batch_serialize(GArrowRecordBatch *record_batch,
}
}

/**
* garrow_record_batch_validate
* @record_batch: A #GArrowRecordBatch
* @error: (nullable): Return location for a #GError or %NULL.
*
* Returns: %TRUE on success, %FALSE on error.
*
* Since: 20.0.0
*/
gboolean
garrow_record_batch_validate(GArrowRecordBatch *record_batch, GError **error)
{
const auto arrow_record_batch = garrow_record_batch_get_raw(record_batch);
return garrow::check(error, arrow_record_batch->Validate(), "[record-batch][validate]");
}

typedef struct GArrowRecordBatchIteratorPrivate_
{
arrow::RecordBatchIterator iterator;
Expand Down Expand Up @@ -697,19 +713,3 @@ garrow_record_batch_iterator_get_raw(GArrowRecordBatchIterator *iterator)
auto priv = GARROW_RECORD_BATCH_ITERATOR_GET_PRIVATE(iterator);
return &priv->iterator;
}

/**
* garrow_record_batch_validate
* @record_batch: A #GArrowRecordBatch
* @error: (nullable): Return location for a #GError or %NULL.
*
* Returns: %TRUE on success, %FALSE on error.
*
* Since: 20.0.0
*/
gboolean
garrow_record_batch_validate(GArrowRecordBatch *record_batch, GError **error)
{
const auto arrow_record_batch = garrow_record_batch_get_raw(record_batch);
return garrow::check(error, arrow_record_batch->Validate(), "[record-batch][validate]");
}

0 comments on commit 4408e2b

Please sign in to comment.