comparison src/symtab.cc @ 8162:293c4b5fe33d

symtab.cc (symbol_table::fcn_info::fcn_info_rep::load_class_method): Call load_class_constructor if name and dispatch_type are the same.
author John W. Eaton <jwe@octave.org>
date Mon, 29 Sep 2008 18:16:57 -0400
parents 64f1cd525656
children 188d38a553c7
comparison
equal deleted inserted replaced
8161:64f1cd525656 8162:293c4b5fe33d
337 symbol_table::fcn_info::fcn_info_rep::load_class_method 337 symbol_table::fcn_info::fcn_info_rep::load_class_method
338 (const std::string& dispatch_type) 338 (const std::string& dispatch_type)
339 { 339 {
340 octave_value retval; 340 octave_value retval;
341 341
342 std::string dir_name; 342 if (name == dispatch_type)
343 343 retval = load_class_constructor ();
344 std::string file_name = load_path::find_method (dispatch_type, name, dir_name); 344 else
345 345 {
346 if (! file_name.empty ()) 346 std::string dir_name;
347 { 347
348 octave_function *fcn = load_fcn_from_file (file_name, dir_name, 348 std::string file_name = load_path::find_method (dispatch_type, name,
349 dispatch_type); 349 dir_name);
350 350
351 if (fcn) 351 if (! file_name.empty ())
352 { 352 {
353 retval = octave_value (fcn); 353 octave_function *fcn = load_fcn_from_file (file_name, dir_name,
354 354 dispatch_type);
355 class_methods[dispatch_type] = retval; 355
356 if (fcn)
357 {
358 retval = octave_value (fcn);
359
360 class_methods[dispatch_type] = retval;
361 }
356 } 362 }
357 } 363 }
358 364
359 return retval; 365 return retval;
360 } 366 }