We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef81d2f commit ed27758Copy full SHA for ed27758
src/libyang.h
@@ -37,6 +37,16 @@ extern "C" {
37
#include "tree_data.h"
38
#include "tree_schema.h"
39
40
+/**
41
+ * @brief libyang v3 compatibility macros with v2.
42
+ */
43
+#define ly_strerrcode ly_strerr
44
+#define ly_last_errmsg ly_last_logmsg
45
+#define ly_errcode(ctx) (ly_err_last(ctx) ? ly_err_last(ctx)->err : 0)
46
+#define ly_errmsg(ctx) (ly_err_last(ctx) ? ly_err_last(ctx)->msg : NULL)
47
+#define ly_errpath(ctx) (ly_err_last(ctx) ? (ly_err_last(ctx)->data_path ? ly_err_last(ctx)->data_path : ly_err_last(ctx)->schema_path) : NULL)
48
+#define ly_vecode(ctx) (ly_err_last(ctx) ? ly_err_last(ctx)->vecode : 0)
49
+
50
/*
51
* The following headers are supposed to be included explicitly:
52
* - hash_table.h
0 commit comments