Changed code so that it will be compatible with c++.

1. Added #ifdef extern "C" to public header files.
2. Changed variables that are key words in c++, to different names (like ns instead of namespace).
3. Add a test_c++.sh for c++ compiling.
This commit is contained in:
shmuels 2020-07-02 15:31:22 +03:00
parent 58ea4eba27
commit 11836151d4

View file

@ -51,7 +51,7 @@
cvec *xml_nsctx_init(char *prefix, char *ns);
int xml_nsctx_free(cvec *nsc);
char *xml_nsctx_get(cvec *nsc, char *prefix);
int xml_nsctx_get_prefix(cvec *cvv, char *namespace, char **prefix);
int xml_nsctx_get_prefix(cvec *cvv, char *ns, char **prefix);
int xml_nsctx_add(cvec *nsc, char *prefix, char *ns);
int xml_nsctx_node(cxobj *x, cvec **ncp);
int xml_nsctx_yang(yang_stmt *yn, cvec **ncp);