Mercurial > vim
annotate src/if_mzsch.h @ 19219:89931701e033 v8.2.0168
patch 8.2.0168: Coverity warning for assigning NULL to an option
Commit: https://github.com/vim/vim/commit/97a2af39cd3249c6cbe5a5c59bc24167632d39ad
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 28 22:52:48 2020 +0100
patch 8.2.0168: Coverity warning for assigning NULL to an option
Problem: Coverity warning for assigning NULL to an option.
Solution: Use empty string instead of NULL.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 28 Jan 2020 23:00:04 +0100 |
parents | 6e3dc2d630c2 |
children |
rev | line source |
---|---|
10042
4aead6a9b7a9
commit https://github.com/vim/vim/commit/edf3f97ae2af024708ebb4ac614227327033ca47
Christian Brabandt <cb@256bit.org>
parents:
10025
diff
changeset
|
1 /* vi:set ts=8 sts=4 sw=4 noet: |
14 | 2 * |
3 * MzScheme interface for Vim, wrapper around scheme.h | |
4 */ | |
5 #ifndef _IF_MZSCH_H_ | |
6 #define _IF_MZSCH_H_ | |
7 #ifdef __MINGW32__ | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10042
diff
changeset
|
8 // Hack to engage Cygwin-specific settings |
14 | 9 # define __CYGWIN32__ |
4074 | 10 # include <stdint.h> |
14 | 11 #endif |
12 | |
10025
068f397d0da4
commit https://github.com/vim/vim/commit/d90b6c02e2900576fb37d95b5e4f4a32b2d7383f
Christian Brabandt <cb@256bit.org>
parents:
4074
diff
changeset
|
13 #ifdef PROTO |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10042
diff
changeset
|
14 // avoid syntax error for defining Thread_Local_Variables. |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10042
diff
changeset
|
15 # define __thread // empty |
10025
068f397d0da4
commit https://github.com/vim/vim/commit/d90b6c02e2900576fb37d95b5e4f4a32b2d7383f
Christian Brabandt <cb@256bit.org>
parents:
4074
diff
changeset
|
16 #endif |
068f397d0da4
commit https://github.com/vim/vim/commit/d90b6c02e2900576fb37d95b5e4f4a32b2d7383f
Christian Brabandt <cb@256bit.org>
parents:
4074
diff
changeset
|
17 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10042
diff
changeset
|
18 // #ifdef needed for "make depend" |
800 | 19 #ifdef FEAT_MZSCHEME |
1894 | 20 # include <schvers.h> |
800 | 21 # include <scheme.h> |
22 #endif | |
14 | 23 |
24 #ifdef __MINGW32__ | |
25 # undef __CYGWIN32__ | |
26 #endif | |
27 | |
28 #if MZSCHEME_VERSION_MAJOR >= 299 | |
29 # define SCHEME_STRINGP(obj) (SCHEME_BYTE_STRINGP(obj) || SCHEME_CHAR_STRINGP(obj)) | |
4074 | 30 # define BYTE_STRING_VALUE(obj) ((char_u *)SCHEME_BYTE_STR_VAL(obj)) |
31 #else | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10042
diff
changeset
|
32 // macros for compatibility with older versions |
4074 | 33 # define scheme_current_config() scheme_config |
34 # define scheme_make_sized_byte_string scheme_make_sized_string | |
35 # define scheme_format_utf8 scheme_format | |
36 # ifndef DYNAMIC_MZSCHEME | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10042
diff
changeset
|
37 // for dynamic MzScheme there will be separate definitions in if_mzsch.c |
4074 | 38 # define scheme_get_sized_byte_string_output scheme_get_sized_string_output |
39 # define scheme_make_byte_string scheme_make_string | |
40 # define scheme_make_byte_string_output_port scheme_make_string_output_port | |
41 # endif | |
14 | 42 |
43 # define SCHEME_BYTE_STRLEN_VAL SCHEME_STRLEN_VAL | |
4074 | 44 # define BYTE_STRING_VALUE(obj) ((char_u *)SCHEME_STR_VAL(obj)) |
274 | 45 # define scheme_byte_string_to_char_string(obj) (obj) |
4074 | 46 # define SCHEME_BYTE_STRINGP SCHEME_STRINGP |
14 | 47 #endif |
48 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10042
diff
changeset
|
49 // Precise GC macros |
1894 | 50 #ifndef MZ_GC_DECL_REG |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10042
diff
changeset
|
51 # define MZ_GC_DECL_REG(size) // empty |
1894 | 52 #endif |
53 #ifndef MZ_GC_VAR_IN_REG | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10042
diff
changeset
|
54 # define MZ_GC_VAR_IN_REG(x, v) // empty |
1894 | 55 #endif |
56 #ifndef MZ_GC_ARRAY_VAR_IN_REG | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10042
diff
changeset
|
57 # define MZ_GC_ARRAY_VAR_IN_REG(x, v, l) // empty |
1894 | 58 #endif |
59 #ifndef MZ_GC_REG | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10042
diff
changeset
|
60 # define MZ_GC_REG() // empty |
1894 | 61 #endif |
62 #ifndef MZ_GC_UNREG | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10042
diff
changeset
|
63 # define MZ_GC_UNREG() // empty |
1894 | 64 #endif |
65 | |
66 #ifdef MZSCHEME_FORCE_GC | |
67 /* | |
68 * force garbage collection to check all references are registered | |
69 * seg faults will indicate not registered refs | |
70 */ | |
71 # define MZ_GC_CHECK() scheme_collect_garbage(); | |
72 #else | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10042
diff
changeset
|
73 # define MZ_GC_CHECK() // empty |
1894 | 74 #endif |
75 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
10042
diff
changeset
|
76 #endif // _IF_MZSCH_H_ |