On Wed, Sep 04, 2013 at 04:02:25AM -0700, vadmium wrote:
> >  		PyGILState_Release(state);
> >  		return py_svn_error();
> >  	}
> > -	*length = PyString_Size(ret);
> > -	memcpy(buffer, PyString_AS_STRING(ret), *length);
> > +	PyBytes_AsStringAndSize(ret, &data, &sz);
> 
> Since the code above has just checked it is a bytes() object, is there anything else that could make this one return an exception?
I'm not sure, but let's check to be safe - PyString_AS_STRING is guaranteed to
always return the valid string.

Cheers,

Jelmer