aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-06-28 22:23:36 +0300
committerArnold D. Robbins <arnold@skeeve.com>2015-06-28 22:23:36 +0300
commit49e523a61a7092a890622e5df18d3503c071d889 (patch)
tree712bb789e6d106345675860a14514128b96f79bc /builtin.c
parent056cd074c60d940d5bb46410f114a6c2584daaae (diff)
parent2befea585a321d9d092bfb99cbfa65350a839752 (diff)
downloadegawk-49e523a61a7092a890622e5df18d3503c071d889.tar.gz
egawk-49e523a61a7092a890622e5df18d3503c071d889.tar.bz2
egawk-49e523a61a7092a890622e5df18d3503c071d889.zip
Merge branch 'master' into feature/cmake
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/builtin.c b/builtin.c
index 1dd7dcbe..c28cd0a8 100644
--- a/builtin.c
+++ b/builtin.c
@@ -3884,18 +3884,18 @@ do_typeof(int nargs)
deref = false;
break;
case Node_typedregex:
- /* Op_push_re does not UPREF */
res = "regexp";
- deref = false;
break;
case Node_val:
case Node_var:
if (arg == Nnull_string)
- res = "untyped";
- else if ((arg->flags & STRING) != 0)
- res = "scalar_s";
- else if ((arg->flags & NUMBER) != 0)
- res = "scalar_n";
+ res = "unassigned";
+ else if ((arg->flags & STRING) != 0) {
+ res = "string";
+ if ((arg->flags & MAYBE_NUM) != 0)
+ res = "strnum";
+ } else if ((arg->flags & NUMBER) != 0)
+ res = "number";
break;
case Node_var_new:
res = "untyped";