@@ -531,7 +531,7 @@ def test_cpython_api(memory_ctor):
531
531
mod = sys .modules [mobj .__class__ .__module__ ]
532
532
# get capsules storing function pointers
533
533
mem_ptr_fn_cap = mod .__pyx_capi__ ["get_usm_pointer" ]
534
- mem_ctx_fn_cap = mod .__pyx_capi__ ["get_context " ]
534
+ mem_ctx_ref_fn_cap = mod .__pyx_capi__ ["get_context_ref " ]
535
535
mem_nby_fn_cap = mod .__pyx_capi__ ["get_nbytes" ]
536
536
# construct Python callable to invoke "get_usm_pointer"
537
537
cap_ptr_fn = ctypes .pythonapi .PyCapsule_GetPointer
@@ -540,21 +540,21 @@ def test_cpython_api(memory_ctor):
540
540
mem_ptr_fn_ptr = cap_ptr_fn (
541
541
mem_ptr_fn_cap , b"DPCTLSyclUSMRef (struct Py_MemoryObject *)"
542
542
)
543
- mem_ctx_fn_ptr = cap_ptr_fn (
544
- mem_ctx_fn_cap , b"DPCTLSyclContextRef (struct Py_MemoryObject *)"
543
+ mem_ctx_ref_fn_ptr = cap_ptr_fn (
544
+ mem_ctx_ref_fn_cap , b"DPCTLSyclContextRef (struct Py_MemoryObject *)"
545
545
)
546
546
mem_nby_fn_ptr = cap_ptr_fn (
547
547
mem_nby_fn_cap , b"size_t (struct Py_MemoryObject *)"
548
548
)
549
549
callable_maker = ctypes .PYFUNCTYPE (ctypes .c_void_p , ctypes .py_object )
550
550
get_ptr_fn = callable_maker (mem_ptr_fn_ptr )
551
- get_ctx_fn = callable_maker (mem_ctx_fn_ptr )
551
+ get_ctx_ref_fn = callable_maker (mem_ctx_ref_fn_ptr )
552
552
get_nby_fn = callable_maker (mem_nby_fn_ptr )
553
553
554
554
capi_ptr = get_ptr_fn (mobj )
555
555
direct_ptr = mobj ._pointer
556
556
assert capi_ptr == direct_ptr
557
- capi_ctx_ref = get_ctx_fn (mobj )
557
+ capi_ctx_ref = get_ctx_ref_fn (mobj )
558
558
direct_ctx_ref = mobj ._context .addressof_ref ()
559
559
assert capi_ctx_ref == direct_ctx_ref
560
560
capi_nbytes = get_nby_fn (mobj )
0 commit comments