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

raulcd 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 95a3ed4b6b GH-48965: [Python][C++] Compare unique_ptr for 
CFlightResult or CFlightInfo to nullptr instead of NULL (#48968)
95a3ed4b6b is described below

commit 95a3ed4b6bb283b1e0a2447a8f2e97f13e613298
Author: Raúl Cumplido <[email protected]>
AuthorDate: Mon Jan 26 11:08:45 2026 +0100

    GH-48965: [Python][C++] Compare unique_ptr for CFlightResult or CFlightInfo 
to nullptr instead of NULL (#48968)
    
    ### Rationale for this change
    
    Cython built code is currently failing to compile on free threaded wheels 
due to:
    ```
    /arrow/python/build/temp.linux-x86_64-cpython-313t/_flight.cpp: In function 
‘PyObject* 
__pyx_gb_7pyarrow_7_flight_12FlightClient_9do_action_2generator2(__pyx_CoroutineObject*,
 PyThreadState*, PyObject*)’:
    /arrow/python/build/temp.linux-x86_64-cpython-313t/_flight.cpp:43068:110: 
error: call of overloaded ‘unique_ptr(NULL)’ is ambiguous
    43068 |           __pyx_t_3 = (__pyx_cur_scope->__pyx_v_result->result == 
((std::unique_ptr< arrow::flight::Result> )NULL));
          |
    ```
    
    ### What changes are included in this PR?
    
    Update comparing `unique_ptr[CFlightResult]` and `unique_ptr[CFlightInfo]` 
from `NULL` to `nullptr`.
    
    ### Are these changes tested?
    
    Yes via archery.
    
    ### Are there any user-facing changes?
    
    No
    
    * GitHub Issue: #48965
    
    Authored-by: Raúl Cumplido <[email protected]>
    Signed-off-by: Raúl Cumplido <[email protected]>
---
 python/pyarrow/_flight.pyx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/python/pyarrow/_flight.pyx b/python/pyarrow/_flight.pyx
index b7e7af260c..f447129cf4 100644
--- a/python/pyarrow/_flight.pyx
+++ b/python/pyarrow/_flight.pyx
@@ -1666,7 +1666,7 @@ cdef class FlightClient(_Weakrefable):
                 result = Result.__new__(Result)
                 with nogil:
                     
check_flight_status(results.get().Next().Value(&result.result))
-                    if result.result == NULL:
+                    if result.result == nullptr:
                         break
                 yield result
         return _do_action_response()
@@ -1695,7 +1695,7 @@ cdef class FlightClient(_Weakrefable):
                 result = FlightInfo.__new__(FlightInfo)
                 with nogil:
                     
check_flight_status(listing.get().Next().Value(&result.info))
-                    if result.info == NULL:
+                    if result.info == nullptr:
                         break
                 yield result
 

Reply via email to