Showing the changes to src/core/chuck_oo.cpp (1 of 6 files). Show all
Unified · Split
| @@ -347,34 +347,27 @@ Chuck_Object::~Chuck_Object() · 346 unmodified lines | ||
| 347 | 347 | // name: dump() |
| 348 | 348 | // desc: output current state (can be overridden) |
| 349 | 349 | //----------------------------------------------------------------------------- |
| 350 | −void Chuck_Object::dump() // 1.4.1.0 | |
| 350 | +void Chuck_Object::dump() // 1.4.1.1 (ge) | |
| 351 | 351 | { |
| 352 | − // TODO: implement! | |
| 352 | + // need type info | |
| 353 | + Chuck_Type * type = this->type_ref; | |
| 354 | + | |
| 355 | + // output state with type info | |
| 356 | + type->dump( this ); | |
| 353 | 357 | } |
| 354 | 358 | |
| 355 | 359 | |
| 356 | 360 | |
| 357 | 361 | |
| 358 | 362 | //----------------------------------------------------------------------------- |
| 359 | −// name: apropos() | |
| 360 | −// desc: output interface (can be overriden; but probably shouldn't be) | |
| 363 | +// name: help() | |
| 364 | +// desc: output type info (can be overriden; but probably shouldn't be) | |
| 361 | 365 | //----------------------------------------------------------------------------- |
| 362 | −void Chuck_Object::apropos() // 1.4.1.0 | |
| 366 | +void Chuck_Object::help() // 1.4.1.0 (ge) | |
| 363 | 367 | { |
| 364 | 368 | // type to unpack |
| 365 | 369 | Chuck_Type * type = this->type_ref; |
| 366 | 370 | |
| 367 | − // if type is generic "@array" | |
| 368 | − if( type->xid == te_array ) | |
| 369 | − { | |
| 370 | − // get more specific | |
| 371 | − Chuck_Array * arr = (Chuck_Array *)this; | |
| 372 | − // however, a number of chuck array allocations still do not | |
| 373 | − // set the m_array_type member; update to this only if it exists | |
| 374 | − if( arr->m_array_type != NULL ) | |
| 375 | − type = arr->m_array_type; | |
| 376 | − } | |
| 377 | − | |
| 378 | 371 | // unpack type and output its info |
| 379 | 372 | type->apropos(); |
| 380 | 373 | } |