title: passing string from python to c++ using ctypes - only the first character is sent
body: <p>I am trying to send a multi-character string from Python to C++ using ctypes. However only the first character of each string is passed.</p>
  
  <p>This is the call in Python:</p>
  
  <pre><code>ctypes.cdll.LoadLibrary(os.path.abspath("nodispersion.so"))
  ctypes.CDLL(os.path.abspath('nodispersion.so')).nodispersion('teststring')
  </code></pre>
  
  <p>And how I define in C++:</p>
  
  <pre><code>extern "C" void nodispersion(char* test)
  {
  
      cout &lt;&lt; "print test " &lt;&lt; test &lt;&lt; "\n";
  }
  </code></pre>
  
  <p>Results in only 't' being printed. </p>
  
  <p>Other types such as int pass fine. In addition if I define the char* in c++ it prints fine so I assume it's something in when it gets passed from Python. Any advice appreciated. </p>