summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2012-06-30 17:40:18 +0000
committerBart Schaefer <barts@users.sourceforge.net>2012-06-30 17:40:18 +0000
commite1491b2542dd78926adf96b203a26366bdb1a576 (patch)
tree6ab320e5ceaef0bc5a6300710f485ab3c607ca2f
parent0e4c462317a95e8e49ffc104dab154ae2e428dd4 (diff)
downloadzsh-e1491b2542dd78926adf96b203a26366bdb1a576.tar.gz
zsh-e1491b2542dd78926adf96b203a26366bdb1a576.tar.xz
zsh-e1491b2542dd78926adf96b203a26366bdb1a576.zip
30540: typeset flag handling with SECONDS
-rw-r--r--ChangeLog7
-rw-r--r--Src/builtin.c5
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index d8f3d50fc..4aebbb154 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-06-30  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* 30540: Src/builtin.c: process the rest of the typeset flags when
+	changing the numeric type of SECONDS e.g. from integer to float.
+
 2012-06-27  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* unposted: belatedly commit version number update.
@@ -16428,5 +16433,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5676 $
+* $Revision: 1.5677 $
 *****************************************************
diff --git a/Src/builtin.c b/Src/builtin.c
index faa5ed374..070cbba9b 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -1976,9 +1976,10 @@ typeset_single(char *cname, char *pname, Param pm, UNUSED(int func),
 			tc = 0;	/* but don't do a normal conversion */
 		    }
 		} else if (!setsecondstype(pm, on, off)) {
-		    if (value && !setsparam(pname, ztrdup(value)))
+		    if (value && !(pm = setsparam(pname, ztrdup(value))))
 			return NULL;
-		    return pm;
+		    usepm = 1;
+		    err = 0;
 		}
 	    }
 	    if (err)