Mercurial > vim
annotate src/iscygpty.h @ 23350:9b86957ddd95 v8.2.2218
patch 8.2.2218: Vim9: failure if passing more args to lambda than expected
Commit: https://github.com/vim/vim/commit/fc0e8f5c3ef51c86cfa4a51f92b264ef79962b9d
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Dec 25 20:24:51 2020 +0100
patch 8.2.2218: Vim9: failure if passing more args to lambda than expected
Problem: Vim9: failure if passing more arguments to a lambda than expected.
Solution: Only put expected arguments on the stack. (closes https://github.com/vim/vim/issues/7548)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 25 Dec 2020 20:30:03 +0100 |
parents | 6e3dc2d630c2 |
children |
rev | line source |
---|---|
9363
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 /* |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 * iscygpty.h -- part of ptycheck |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 * https://github.com/k-takata/ptycheck |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 * |
12301
93155ae168fb
patch 8.0.1030: MS-Windows: wrong size computation in is_cygpty()
Christian Brabandt <cb@256bit.org>
parents:
9363
diff
changeset
|
5 * Copyright (c) 2015-2017 K.Takata |
9363
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 * |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 * You can redistribute it and/or modify it under the terms of either |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 * the MIT license (as described below) or the Vim license. |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 * |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 * Permission is hereby granted, free of charge, to any person obtaining |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 * a copy of this software and associated documentation files (the |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 * "Software"), to deal in the Software without restriction, including |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 * without limitation the rights to use, copy, modify, merge, publish, |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 * distribute, sublicense, and/or sell copies of the Software, and to |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 * permit persons to whom the Software is furnished to do so, subject to |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 * the following conditions: |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 * |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 * The above copyright notice and this permission notice shall be |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 * included in all copies or substantial portions of the Software. |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 * |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 */ |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 #ifndef _ISCYGPTY_H |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 #define _ISCYGPTY_H |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 |
12301
93155ae168fb
patch 8.0.1030: MS-Windows: wrong size computation in is_cygpty()
Christian Brabandt <cb@256bit.org>
parents:
9363
diff
changeset
|
33 #ifdef _WIN32 |
9363
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 int is_cygpty(int fd); |
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 int is_cygpty_used(void); |
12301
93155ae168fb
patch 8.0.1030: MS-Windows: wrong size computation in is_cygpty()
Christian Brabandt <cb@256bit.org>
parents:
9363
diff
changeset
|
36 #else |
93155ae168fb
patch 8.0.1030: MS-Windows: wrong size computation in is_cygpty()
Christian Brabandt <cb@256bit.org>
parents:
9363
diff
changeset
|
37 #define is_cygpty(fd) 0 |
93155ae168fb
patch 8.0.1030: MS-Windows: wrong size computation in is_cygpty()
Christian Brabandt <cb@256bit.org>
parents:
9363
diff
changeset
|
38 #define is_cygpty_used() 0 |
93155ae168fb
patch 8.0.1030: MS-Windows: wrong size computation in is_cygpty()
Christian Brabandt <cb@256bit.org>
parents:
9363
diff
changeset
|
39 #endif |
9363
f9dda6450c76
commit https://github.com/vim/vim/commit/97ff9b9cffd97219d888874b9b3811d55e99c78f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
12301
diff
changeset
|
41 #endif // _ISCYGPTY_H |