title: bytes or integer address expected instead of str instance Python 3
body: <blockquote>
    <p>fib.cpp</p>
  </blockquote>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;pthread.h&gt;
  #include &lt;iostream&gt;
  using namespace std;
  
  extern "C" const char *hello (char* b){
  static string s = "hello ";
  s = s + b;
  return s.c_str();
  }
  </code></pre>
  
  <blockquote>
    <p>wrap.py</p>
  </blockquote>
  
  <pre><code>import ctypes
  _libfib = ctypes.CDLL('./fib.so');
  
  def ctypes_hello(a):
      _libfib.hello.restype = ctypes.c_char_p;
      return _libfib.hello(ctypes.c_char_p(a));
  </code></pre>
  
  <blockquote>
    <p>Generate .so files</p>
  </blockquote>
  
  <pre><code>g++ -std=c++11 -shared -c -fPIC fib.cpp -o fib.o
  g++ -std=c++11 -shared -Wl,-soname,fib.so -o fib.so fib.o
  </code></pre>
  
  <p><strong>Run wrap.py from command line</strong> </p>
  
  <pre><code>from wrap import *
  ctypes_hello("world")
  </code></pre>
  
  <blockquote>
    <p>Its working perfectly with python 2. I am getting Error <strong>bytes or
    integer address expected instead of str instance</strong> when I switch to
    Python 3</p>
  </blockquote>