Browse Source

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 years ago
parent
commit
371332203b
1 changed files with 3 additions and 0 deletions
  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},