base.pyx 348 B

123456789101112131415
  1. __doc__ = """
  2. Basic model typedefs, constants and common methods.
  3. """
  4. cdef bytes buffer_dump(const Buffer* buf):
  5. """
  6. Return a buffer's content as a string.
  7. :param const Buffer* buf Pointer to a buffer to be read.
  8. :rtype: str
  9. """
  10. cdef unsigned char* buf_stream = (<unsigned char*>buf.addr)
  11. return buf_stream[:buf.sz]