浏览代码

core: kemi - added identifier for int-str type

- useful for dumping attributes for special kemi functions
Daniel-Constantin Mierla 9 年之前
父节点
当前提交
0135d9a38a
共有 2 个文件被更改,包括 6 次插入4 次删除
  1. 5 4
      kemi.c
  2. 1 0
      kemi.h

+ 5 - 4
kemi.c

@@ -1027,10 +1027,11 @@ typedef struct sr_kemi_param_map {
  *
  */
 static sr_kemi_param_map_t _sr_kemi_param_map[] = {
-	{ SR_KEMIP_NONE, str_init("none") },
-	{ SR_KEMIP_INT,  str_init("int") },
-	{ SR_KEMIP_STR,  str_init("str") },
-	{ SR_KEMIP_BOOL, str_init("bool") },
+	{ SR_KEMIP_NONE,   str_init("none") },
+	{ SR_KEMIP_INT,    str_init("int") },
+	{ SR_KEMIP_STR,    str_init("str") },
+	{ SR_KEMIP_BOOL,   str_init("bool") },
+	{ SR_KEMIP_INTSTR, str_init("int-str") },
 	{ 0, STR_NULL }
 };
 

+ 1 - 0
kemi.h

@@ -30,6 +30,7 @@
 #define SR_KEMIP_INT	(1<<0)	/* type integer */
 #define SR_KEMIP_STR	(1<<1)	/* type str* */
 #define SR_KEMIP_BOOL	(1<<2)	/* type boolean (0/1) */
+#define SR_KEMIP_INTSTR	(1<<3)	/* type integer or str* */
 
 #define SR_KEMI_FALSE	0
 #define SR_KEMI_TRUE	1