aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-04-30 14:27:21 +0200
committerJustin M. Keyes <justinkz@gmail.com>2017-04-30 14:27:21 +0200
commit26a479ae41135a6efc6a77bb72ccb5a3c092fce9 (patch)
tree8d1089104b7fa11da8031f208e456e4e76ed262e /src
parent0df1b6655be5385c9cbb70dca1c042c6447ec50b (diff)
parent97126bfa020f714d78e5e6f82b59c697ce7dd467 (diff)
downloadrneovim-26a479ae41135a6efc6a77bb72ccb5a3c092fce9.tar.gz
rneovim-26a479ae41135a6efc6a77bb72ccb5a3c092fce9.tar.bz2
rneovim-26a479ae41135a6efc6a77bb72ccb5a3c092fce9.zip
Merge #6622 'api: Deprecate nvim_buf_get_number'
Diffstat (limited to 'src')
-rw-r--r--src/nvim/api/buffer.c4
-rw-r--r--src/nvim/func_attr.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index ae5728ee21..5de1535bce 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -567,11 +567,15 @@ void nvim_buf_set_option(Buffer buffer, String name, Object value, Error *err)
/// Gets the buffer number
///
+/// @deprecated The buffer number now is equal to the object id,
+/// so there is no need to use this function.
+///
/// @param buffer Buffer handle
/// @param[out] err Error details, if any
/// @return Buffer number
Integer nvim_buf_get_number(Buffer buffer, Error *err)
FUNC_API_SINCE(1)
+ FUNC_API_DEPRECATED_SINCE(2)
{
Integer rv = 0;
buf_T *buf = find_buffer_by_handle(buffer, err);
diff --git a/src/nvim/func_attr.h b/src/nvim/func_attr.h
index 18410445e1..756c6d05ee 100644
--- a/src/nvim/func_attr.h
+++ b/src/nvim/func_attr.h
@@ -187,6 +187,7 @@
# define FUNC_API_NOEXPORT
# define FUNC_API_NOEVAL
# define FUNC_API_SINCE(X)
+# define FUNC_API_DEPRECATED_SINCE(X)
# define FUNC_ATTR_MALLOC REAL_FATTR_MALLOC
# define FUNC_ATTR_ALLOC_SIZE(x) REAL_FATTR_ALLOC_SIZE(x)
# define FUNC_ATTR_ALLOC_SIZE_PROD(x, y) REAL_FATTR_ALLOC_SIZE_PROD(x, y)