Mercurial > vim
annotate src/if_mzsch.h @ 11422:ad4b56939140 v8.0.0595
patch 8.0.0595: Coverity warning for not checking return value
commit https://github.com/vim/vim/commit/beb9cb19c660484488a71a25eda46ab0fa579278
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon May 1 14:14:04 2017 +0200
patch 8.0.0595: Coverity warning for not checking return value
Problem: Coverity warning for not checking return value of dict_add().
Solution: Check the return value for FAIL.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 01 May 2017 14:15:03 +0200 |
parents | 4aead6a9b7a9 |
children | 6e3dc2d630c2 |
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__ | |
8 /* Hack to engage Cygwin-specific settings */ | |
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 |
068f397d0da4
commit https://github.com/vim/vim/commit/d90b6c02e2900576fb37d95b5e4f4a32b2d7383f
Christian Brabandt <cb@256bit.org>
parents:
4074
diff
changeset
|
14 /* avoid syntax error for defining Thread_Local_Variables. */ |
068f397d0da4
commit https://github.com/vim/vim/commit/d90b6c02e2900576fb37d95b5e4f4a32b2d7383f
Christian Brabandt <cb@256bit.org>
parents:
4074
diff
changeset
|
15 # define __thread /* empty */ |
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 |
800 | 18 /* #ifdef needed for "make depend" */ |
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 | |
32 /* macros for compatibility with older versions */ | |
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 | |
37 /* for dynamic MzScheme there will be separate definitions in if_mzsch.c */ | |
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 | |
1894 | 49 /* Precise GC macros */ |
50 #ifndef MZ_GC_DECL_REG | |
2330 | 51 # define MZ_GC_DECL_REG(size) /* empty */ |
1894 | 52 #endif |
53 #ifndef MZ_GC_VAR_IN_REG | |
2330 | 54 # define MZ_GC_VAR_IN_REG(x, v) /* empty */ |
1894 | 55 #endif |
56 #ifndef MZ_GC_ARRAY_VAR_IN_REG | |
57 # define MZ_GC_ARRAY_VAR_IN_REG(x, v, l) /* empty */ | |
58 #endif | |
59 #ifndef MZ_GC_REG | |
2330 | 60 # define MZ_GC_REG() /* empty */ |
1894 | 61 #endif |
62 #ifndef MZ_GC_UNREG | |
2330 | 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 | |
73 # define MZ_GC_CHECK() /* empty */ | |
74 #endif | |
75 | |
14 | 76 #endif /* _IF_MZSCH_H_ */ |