You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/08/13 08:39:47 UTC

[GitHub] cclauss closed pull request #12144: [MXNET-313] Undefined names: C --> ctypes

cclauss closed pull request #12144: [MXNET-313] Undefined names: C --> ctypes
URL: https://github.com/apache/incubator-mxnet/pull/12144
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/python/mxnet/base.py b/python/mxnet/base.py
index 1bbc121ded9..fb32c613dcf 100644
--- a/python/mxnet/base.py
+++ b/python/mxnet/base.py
@@ -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):


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services