diff options
author | antirez <antirez> | 2005-03-11 09:31:36 +0000 |
---|---|---|
committer | antirez <antirez> | 2005-03-11 09:31:36 +0000 |
commit | dd812eddd8b4d4e14ac4f34724e97afff880f7c3 (patch) | |
tree | fe2d35520b9f990fdd34a90a8eb28d17b06218d2 /jim.c | |
parent | 82a9d97a1dc4f107d23ce03bd6b2ca358d7a09c3 (diff) | |
download | jimtcl-dd812eddd8b4d4e14ac4f34724e97afff880f7c3.zip jimtcl-dd812eddd8b4d4e14ac4f34724e97afff880f7c3.tar.gz jimtcl-dd812eddd8b4d4e14ac4f34724e97afff880f7c3.tar.bz2 |
Fix about [rename] against procedures with statics.
Added a regression test to test.tcl
(I plan to move everything inside regtest.tcl into test.tcl).
Diffstat (limited to 'jim.c')
-rw-r--r-- | jim.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* Jim - A small embeddable Tcl interpreter * Copyright 2005 Salvatore Sanfilippo <antirez@invece.org> * - * $Id: jim.c,v 1.90 2005/03/11 09:25:45 antirez Exp $ + * $Id: jim.c,v 1.91 2005/03/11 09:31:36 antirez Exp $ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -2859,6 +2859,8 @@ int Jim_RenameCommand(Jim_Interp *interp, const char *oldName, * freed by the hash table methods, fake a C-coded command * setting cmdPtr->cmdProc as not NULL */ cmdPtr->cmdProc = (void*)1; + /* Also make sure delProc is NULL. */ + cmdPtr->delProc = NULL; /* Destroy the old command, and make sure the new is freed * as well. */ Jim_DeleteHashEntry(&interp->commands, oldName); |