Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[MXNET-313] Undefined names: C --> ctypes #12144

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions python/mxnet/base.py
Original file line number Diff line number Diff line change
@@ -732,13 +732,13 @@ def write_all_str(module_file, module_all_list):

def cint(init_val=0):
"""create a C int with an optional initial value"""
return C.c_int(init_val)
return ctypes.c_int(init_val)

def int_addr(x):
"""given a c_int, return it's address as an int ptr"""
x_addr = C.addressof(x)
int_p = C.POINTER(C.c_int)
x_int_addr = C.cast(x_addr, int_p)
x_addr = ctypes.addressof(x)
int_p = ctypes.POINTER(ctypes.c_int)
x_int_addr = ctypes.cast(x_addr, int_p)
return x_int_addr

def checked_call(f, *args):