diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | generic/tclObj.c | 8 | ||||
-rw-r--r-- | tests/listObj.test | 13 | ||||
-rw-r--r-- | tests/obj.test | 10 |
4 files changed, 24 insertions, 19 deletions
@@ -1,3 +1,15 @@ +2005-05-17 Don Porter <dgp@users.sourceforge.net> + + * generic/tclObj.c (TclInitObjSubsystem): Removed the + * tests/listObj.test: registration of the Tcl_ObjType's "list", + * tests/obj.test: "procbody", "index", "ensembleCommand", + "localVarName", and "levelReference". The only reason to register + a Tcl_ObjType is to have it returned by Tcl_GetObjType, and the + only reason for that is to retrieve a (Tcl_ObjType *) to pass to + Tcl_ConvertToType(). None of the types above can support a + Tcl_ConvertToType() call; they panic. Better not to offer something + than to lead users into a panic. + 2005-05-15 Kevin Kenny <kennykb@users.sourceforge.net> * win/tclWin32Dll.c: conditioned definition of diff --git a/generic/tclObj.c b/generic/tclObj.c index 5f5cfb2..88d31f0 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.83 2005/05/10 18:34:46 kennykb Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.84 2005/05/17 21:29:17 dgp Exp $ */ #include "tclInt.h" @@ -383,18 +383,12 @@ TclInitObjSubsystem() Tcl_RegisterObjType(&tclWideIntType); Tcl_RegisterObjType( &tclBignumType ); Tcl_RegisterObjType(&tclStringType); - Tcl_RegisterObjType(&tclListType); Tcl_RegisterObjType(&tclDictType); Tcl_RegisterObjType(&tclByteCodeType); - Tcl_RegisterObjType(&tclProcBodyType); Tcl_RegisterObjType(&tclArraySearchType); - Tcl_RegisterObjType(&tclIndexType); Tcl_RegisterObjType(&tclNsNameType); - Tcl_RegisterObjType(&tclEnsembleCmdType); Tcl_RegisterObjType(&tclCmdNameType); - Tcl_RegisterObjType(&tclLocalVarNameType); Tcl_RegisterObjType(&tclRegexpType); - Tcl_RegisterObjType(&tclLevelReferenceType); #ifdef TCL_COMPILE_STATS Tcl_MutexLock(&tclObjMutex); diff --git a/tests/listObj.test b/tests/listObj.test index fd11c24..aa3f951 100644 --- a/tests/listObj.test +++ b/tests/listObj.test @@ -11,21 +11,18 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: listObj.test,v 1.6 2004/05/19 12:15:04 dkf Exp $ +# RCS: @(#) $Id: listObj.test,v 1.7 2005/05/17 21:29:18 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import -force ::tcltest::* } -testConstraint testobj [llength [info commands testobj]] - catch {unset x} -test listobj-1.1 {Tcl_GetListObjType} testobj { - set t [testobj types] - set first [string first "list" $t] - set result [expr {$first != -1}] -} {1} +test listobj-1.1 {Tcl_GetListObjType} empty { + # Test removed; tested an internal detail + # that's no longer correct, and duplicated test obj-1.1 +} {} test listobj-2.1 {Tcl_SetListObj, use in lappend} { catch {unset x} diff --git a/tests/obj.test b/tests/obj.test index 7ca3e8e..dfbad05 100644 --- a/tests/obj.test +++ b/tests/obj.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: obj.test,v 1.14 2005/05/10 18:35:22 kennykb Exp $ +# RCS: @(#) $Id: obj.test,v 1.15 2005/05/17 21:29:18 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -47,17 +47,19 @@ test obj-1.1 {Tcl_AppendAllObjTypes, and InitTypeTable, Tcl_RegisterObjType} tes set r 1 foreach {t} { {array search} + bignum boolean bytearray bytecode + cmdName + dict double end-offset - index int - list nsName - procbody + regexp string + wideInt } { set first [string first $t [testobj types]] set r [expr {$r && ($first != -1)}] |