commit | 1f03f67f7cdff72c89238fc740820093d6efc3aa | [log] [tgz] |
---|---|---|
author | Rich Lane <rlane@bigswitch.com> | Tue Aug 05 00:10:00 2014 -0700 |
committer | Rich Lane <rlane@bigswitch.com> | Tue Aug 05 00:10:00 2014 -0700 |
tree | 3887f6ede2df51dd21dcceea9794e7857632f078 | |
parent | eadf463c7ca04b598353f654d55fab46fee4fec1 [diff] |
loci: add a convenience wrapper around of_object_id_str
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):