浏览代码

added $null

- PV representation of K 'null' keyword
- can be used for assignemts to unset the PV (for easier K-compatibility
  reason, e.g., $ru = $null)
- do not use it in logical expressions (avoid: if($avp(abc)==$null) ; use
  instead: if(! defined $avp(abc))
Daniel-Constantin Mierla 16 年之前
父节点
当前提交
371332203b
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      modules_k/pv/pv.c

+ 3 - 0
modules_k/pv/pv.c

@@ -199,6 +199,9 @@ static pv_export_t mod_pvs[] = {
 	{{"ml", (sizeof("ml")-1)}, /* */
 		PVT_OTHER, pv_get_msg_len, 0,
 		0, 0, 0, 0},
+	{{"null", (sizeof("null")-1)}, /* */
+		PVT_NULL, pv_get_null, 0,
+		0, 0, 0, 0},
 	{{"od", (sizeof("od")-1)}, /* */
 		PVT_OTHER, pv_get_ouri_attr, 0,
 		0, 0, pv_init_iname, 2},