File: compile_ansi.cpp

package info (click to toggle)
yyjson 0.10.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,848 kB
  • sloc: ansic: 26,228; xml: 226; javascript: 99; sh: 13; makefile: 8; cpp: 8; objc: 7
file content (14 lines) | stat: -rw-r--r-- 357 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* 
 This file is used to test the compatibility of C++. 
 It should be able to compile successfully in C++ environments.
*/

#include "yyjson.c"

int main(void) {
    yyjson_mut_doc *mdoc = yyjson_mut_doc_new(NULL);
    yyjson_mut_val *root = yyjson_mut_int(mdoc, 0);
    yyjson_mut_doc_set_root(mdoc, root);
    yyjson_mut_doc_free(mdoc);
    return 0;
}