title: c_void_p value to void*
body: <p>I have defined ctypes struct, sommething like this:</p>
  
  <pre><code>class MyStruct(Structure):
      _fields_ = [('x', ctypes.c_ulonglong), ('y', ctypes.c_ulonglong)]
  </code></pre>
  
  <p>Then I make ctypes struct object in python, and pass that object to cython function.</p>
  
  <pre><code>struct_instance = MyStruct(4, 2)
  some_cy_func(struct_instance)
  </code></pre>
  
  <p>In cython function I need call C function which accepts parameter of MyStruct type. We need to pass parameter by value, not by reference. The call to function will be with cython, not via ctypes.</p>
  
  <p>My question is, how can I get actual value of C struct from ctypes, and then pass it to C function with cython.</p>
  
  <p>Currently I have sommething like this:</p>
  
  <pre><code>ptr = ctypes.cast(ctypes.addressof(struct_instance), ctypes.POINTER(ctypes.c_void_p))
  prt_content = ptr.contents
  </code></pre>
  
  <p>In prt_content I have c_void_p(4), but that doesn't help me. Does anyone knows some way how to pass cytpes structure to C function wrapped via cython, or maybe this isn't possible at all?</p>