jerry_buffer.h 530 B

123456789101112131415161718192021222324
  1. /*
  2. * Licensed under the Apache License, Version 2.0 (the "License")
  3. * Copyright (c) 2016-2018, Intel Corporation.
  4. *
  5. * ported from zephyr.js
  6. * COPYRIGHT (C) 2018, RT-Thread Development Team
  7. */
  8. #ifndef JERRY_BUFFER_H__
  9. #define JERRY_BUFFER_H__
  10. typedef struct js_buffer
  11. {
  12. uint8_t *buffer;
  13. uint32_t bufsize;
  14. } js_buffer_t;
  15. int js_buffer_init(void);
  16. int js_buffer_cleanup(void);
  17. js_buffer_t *jerry_buffer_find(const jerry_value_t obj);
  18. jerry_value_t jerry_buffer_create(uint32_t size, js_buffer_t **ret_buf);
  19. #endif