From d24d02c02de5ceda9286504c8fa94a53cdd1b13e Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 15 Sep 2005 16:13:32 +0000 Subject: [PATCH] squawk about zero-valued TypeHandles too --- dtool/src/interrogatedb/py_panda.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dtool/src/interrogatedb/py_panda.cxx b/dtool/src/interrogatedb/py_panda.cxx index f07e46ad5f..dd22766a9e 100644 --- a/dtool/src/interrogatedb/py_panda.cxx +++ b/dtool/src/interrogatedb/py_panda.cxx @@ -235,7 +235,12 @@ void Dtool_Accum_MethDefs(PyMethodDef in[], MethodDefmap &themap) void RegisterRuntimeClass(Dtool_PyTypedObject * otype, int class_id) { - if(class_id > 0) { + if (class_id == 0) { + interrogatedb_cat.warning() + << "Class " << otype->_name + << " has a zero TypeHandle value; check that init_type() is called.\n"; + + } else if (class_id > 0) { RunTimeTypeDictionary &dict = GetRunTimeDictionary(); pair result = dict.insert(RunTimeTypeDictionary::value_type(class_id, otype)); @@ -244,7 +249,8 @@ RegisterRuntimeClass(Dtool_PyTypedObject * otype, int class_id) { Dtool_PyTypedObject *other_type = (*result.first).second; interrogatedb_cat.warning() << "Classes " << otype->_name << " and " << other_type->_name - << " share the same TypeHandle value; check class definitions.\n"; + << " share the same TypeHandle value (" << class_id + << "); check class definitions.\n"; } else { GetRunTimeTypeList().insert(class_id);