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. Changed char* to const char* for constant strings.
This commit is contained in:
shmuels 2020-07-02 15:00:53 +03:00
parent eda4a58ebf
commit 58ea4eba27
27 changed files with 274 additions and 119 deletions

View file

@ -568,14 +568,14 @@ netconf_unknown_element_xml(cxobj **xret,
int
netconf_unknown_namespace(cbuf *cb,
char *type,
char *namespace,
char *ns,
char *message)
{
int retval = -1;
cxobj *xret = NULL;
if (netconf_common_xml(&xret, type, "unknown-namespace",
"bad-namespace", namespace, message) < 0)
"bad-namespace", ns, message) < 0)
goto done;
if (clicon_xml2cbuf(cb, xret, 0, 0, -1) < 0)
goto done;
@ -589,11 +589,11 @@ netconf_unknown_namespace(cbuf *cb,
int
netconf_unknown_namespace_xml(cxobj **xret,
char *type,
char *namespace,
char *ns,
char *message)
{
return netconf_common_xml(xret, type, "unknown-namespace",
"bad-namespace", namespace, message);
"bad-namespace", ns, message);
}
/*! Create Netconf access-denied error cbuf according to RFC 6241 App A