message: Convert strings directly without using SWIG_AsCharPtrAndSize
  * This function is optionally compiled into bindings files so it might
  not be present, there's no need to depend upon it.
diff: @@ -359,8 +359,6 @@ struct TypeConversion<rdctype::array<U>, false>
  };
  // specialisation for string
  -SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc);
  -
  template <>
  struct TypeConversion<rdctype::str, false>
  {
  @@ -378,26 +376,35 @@ struct TypeConversion<rdctype::str, false>
  static int Convert(PyObject *in, rdctype::str &out)
  {
  + if(PyUnicode_Check(in))
  + {
  + PyObject *bytes = PyUnicode_AsUTF8String(in);
  +
  + if(!bytes)
  + return SWIG_ERROR;
  +
  char *buf = NULL;
  - size_t size = 0;
  - int alloc = SWIG_OLDOBJ;
  + Py_ssize_t size = 0;
  - if(SWIG_IsOK(SWIG_AsCharPtrAndSize(in, &buf, &size, &alloc)))
  - {
  - if(!buf)
  - return SWIG_NullReferenceError;
  + int ret = PyBytes_AsStringAndSize(bytes, &buf, &size);
  + if(ret == 0)
  + {
  out.count = (int)size - 1;
  out.elems = (char *)out.allocate(size);
  memcpy(out.elems, buf, size - 1);
  out.elems[size] = 0;
  - if(alloc == SWIG_NEWOBJ)
  - delete[] buf;
  + Py_DecRef(bytes);
  return SWIG_OK;
  }
  + Py_DecRef(bytes);
  +
  + return SWIG_ERROR;
  + }
  +
  swig_type_info *type_info = GetTypeInfo();
  if(!type_info)
  return SWIG_ERROR;
  @@ -415,7 +422,6 @@ struct TypeConversion<rdctype::str, false>
  return PyUnicode_FromStringAndSize(in.elems, in.count);
  }
  };
  -
  // free functions forward to struct
  template <typename T>
  int Convert(PyObject *in, T &out)
  