Merge into master from pull request #307:
loci: add a convenience wrapper around of_object_id_str (https://github.com/floodlight/loxigen/pull/307)
diff --git a/c_gen/c_code_gen.py b/c_gen/c_code_gen.py
index 191fcd3..6556d3b 100644
--- a/c_gen/c_code_gen.py
+++ b/c_gen/c_code_gen.py
@@ -426,6 +426,14 @@
#endif /* OF_DEBUG_DUMP */
""")
+ out.write("""
+static inline const char *
+of_class_name(of_object_t *obj)
+{
+ return of_object_id_str[obj->object_id];
+}
+""")
+
out.write("\n#endif /* Top header file */\n")
def match_c_gen(out, name):