41 #if MICROPY_PY_IO_BUFFEREDWRITER 42 typedef struct _mp_obj_bufwriter_t {
69 memcpy(self->buf + self->len, buf, size);
80 memcpy(self->buf + self->len, buf, rem);
81 buf = (
byte*)buf + rem;
89 assert(out_sz == self->alloc);
104 assert(out_sz == self->len);
122 .
write = bufwriter_write,
127 .
name = MP_QSTR_BufferedWriter,
128 .make_new = bufwriter_make_new,
129 .protocol = &bufwriter_stream_p,
132 #endif // MICROPY_PY_IO_BUFFEREDWRITER 134 #if MICROPY_MODULE_FROZEN_STR 144 args[0] = package_in;
190 #if MICROPY_PY_IO_RESOURCE_STREAM 193 #if MICROPY_PY_IO_FILEIO 195 #if MICROPY_CPYTHON_COMPAT 200 #if MICROPY_PY_IO_BYTESIO 203 #if MICROPY_PY_IO_BUFFEREDWRITER void vstr_init_fixed_buf(vstr_t *vstr, size_t alloc, char *buf)
void mp_load_method_maybe(mp_obj_t obj, qstr attr, mp_obj_t *dest)
#define MP_DEFINE_CONST_DICT(dict_name, table_name)
void vstr_add_strn(vstr_t *vstr, const char *str, size_t len)
#define mp_stream_write_exactly(stream, buf, size, err)
#define MP_OBJ_FROM_PTR(p)
void mp_arg_check_num(size_t n_args, size_t n_kw, size_t n_args_min, size_t n_args_max, bool takes_kw)
void vstr_add_byte(vstr_t *vstr, byte v)
mp_int_t mp_obj_get_int(mp_const_obj_t arg)
#define VSTR_FIXED(vstr, alloc)
const mp_map_t mp_const_empty_map
const mp_obj_type_t mp_type_stringio
#define MP_DEFINE_CONST_FUN_OBJ_1(obj_name, fun_name)
mp_obj_t mp_builtin___import__(size_t n_args, const mp_obj_t *args)
#define MP_OBJ_NEW_SMALL_INT(small_int)
const mp_obj_module_t mp_module_io
#define m_new_obj_var(obj_type, var_type, var_num)
const char * mp_obj_str_get_data(mp_obj_t self_in, size_t *len)
#define MICROPY_ALLOC_PATH_MAX
NORETURN void mp_raise_OSError(int errno_)
mp_obj_t mp_obj_new_str(const char *data, size_t len, bool make_qstr_if_not_already)
mp_obj_t mp_builtin_open(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs)
const mp_obj_type_t mp_type_type
const char * mp_find_frozen_str(const char *str, size_t *len)
#define MP_DEFINE_CONST_FUN_OBJ_2(obj_name, fun_name)
mp_uint_t(* write)(mp_obj_t obj, const void *buf, mp_uint_t size, int *errcode)
const mp_obj_type_t mp_type_module
const mp_obj_type_t mp_type_bytesio
NORETURN void mp_raise_TypeError(const char *msg)
void * memcpy(void *dst, const void *src, size_t n)