Mercurial > vim
view src/proto/blob.pro @ 15581:c2382f0d1279 v8.1.0798
patch 8.1.0798: changing a blob while iterating over it works strangely
commit https://github.com/vim/vim/commit/dd29ea18050284526174b5685781469240f5bc4a
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 23 21:56:21 2019 +0100
patch 8.1.0798: changing a blob while iterating over it works strangely
Problem: Changing a blob while iterating over it works strangely.
Solution: Make a copy of the Blob before iterating.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 23 Jan 2019 22:00:06 +0100 |
parents | 435fcefd2c8e |
children | 44ea60ca593b |
line wrap: on
line source
/* blob.c */ blob_T *blob_alloc(void); int rettv_blob_alloc(typval_T *rettv); void rettv_blob_set(typval_T *rettv, blob_T *b); int blob_copy(typval_T *from, typval_T *to); void blob_free(blob_T *b); void blob_unref(blob_T *b); long blob_len(blob_T *b); char_u blob_get(blob_T *b, int idx); void blob_set(blob_T *b, int idx, char_u c); int blob_equal(blob_T *b1, blob_T *b2); int read_blob(FILE *fd, blob_T *blob); int write_blob(FILE *fd, blob_T *blob); char_u *blob2string(blob_T *blob, char_u **tofree, char_u *numbuf); blob_T *string2blob(char_u *str); /* vim: set ft=c : */