This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 4408e2b053 GH-45354: [GLib] Fix garrow_record_batch_validate() 
definied location (#45355)
4408e2b053 is described below

commit 4408e2b053240766ce81e5acee6520427623f1e5
Author: Hiroyuki Sato <[email protected]>
AuthorDate: Mon Jan 27 14:11:52 2025 +0900

    GH-45354: [GLib] Fix garrow_record_batch_validate() definied location 
(#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]>
---
 c_glib/arrow-glib/record-batch.cpp | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/c_glib/arrow-glib/record-batch.cpp 
b/c_glib/arrow-glib/record-batch.cpp
index 967b44538e..07e83c9f23 100644
--- a/c_glib/arrow-glib/record-batch.cpp
+++ b/c_glib/arrow-glib/record-batch.cpp
@@ -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;
@@ -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]");
-}

Reply via email to