2
0

qapi-type-helpers.c 554 B

1234567891011121314151617181920212223
  1. /*
  2. * QAPI common helper functions
  3. *
  4. * This file provides helper functions related to types defined
  5. * in the QAPI schema.
  6. *
  7. * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
  8. * See the COPYING.LIB file in the top-level directory.
  9. *
  10. */
  11. #include "qemu/osdep.h"
  12. #include "qapi/error.h"
  13. #include "qapi/type-helpers.h"
  14. HumanReadableText *human_readable_text_from_str(GString *str)
  15. {
  16. HumanReadableText *ret = g_new0(HumanReadableText, 1);
  17. ret->human_readable_text = g_steal_pointer(&str->str);
  18. return ret;
  19. }