This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
Register
Sign In
jdk-build-libs
/
json-c
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
11
Wiki
evaluate
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
HPC
Browse Source
Added json_stdbool.h following similar pattern to json_inttypes.h to provide <stdbool.h> support wherever it is missing.
pull/24/head
Mateusz Loskot
13 years ago
parent
ae18ed693a
commit
af5ae9903a
4 changed files
with
38 additions
and
4 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
json_config.h.in
+1
-3
json_object_iterator.c
+2
-1
json_object_iterator.h
+33
-0
json_stdbool.h
+ 2
- 0
json_config.h.in
View File
@@ -1,3 +1,5 @@
/* Define to 1 if you have the <stdbool.h> header file. */
#undef JSON_C_HAVE_STDBOOL_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef JSON_C_HAVE_INTTYPES_H
+ 1
- 3
json_object_iterator.c
View File
@@ -16,13 +16,11 @@
*/
#include <stddef.h>
#include <stdbool.h>
#include "json.h"
#include "json_object_private.h"
#include "json_object_iterator.h"
#include "json_stdbool.h"
/**
* How It Works
*
+ 2
- 1
json_object_iterator.h
View File
@@ -29,7 +29,8 @@
#define JSON_OBJECT_ITERATOR_H
#include <stddef.h>
#include <stdbool.h>
#include "json_stdbool.h"
#ifdef __cplusplus
extern "C" {
+ 33
- 0
json_stdbool.h
View File
@@ -0,0 +1,33 @@
#ifndef _json_stdbool_h_
#define _json_stdbool_h_
#include "json_config.h"
#ifndef __cplusplus
#if defined(_MSC_VER)
/* The C language implementation does not provide the standard header
* file "stdbool.h" as required by ISO/IEC 9899:1999.
*/
#if !defined(bool)
#define bool int
#endif
#if !defined(true)
#define true 1
#endif
#if !defined(false)
#define false 0
#endif
#else /* ndef _MSC_VER */
#ifdef JSON_C_HAVE_STDBOOL_H
#include <stdbool.h>
#endif
#endif /* _MSC_VER */
#endif /* __cplusplus */
#endif /* _json_stdbool_h_ */
Write
Preview
Loading…
Cancel
Save