[PD-cvs] pd/src objective.tcl,1.1.2.15,1.1.2.16

Mathieu Bouchard matju at users.sourceforge.net
Fri Aug 18 18:35:40 CEST 2006


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7762

Modified Files:
      Tag: devel_0_39
	objective.tcl 
Log Message:
streamlining.
also not checking for null pointer anymore (not too useful).


Index: objective.tcl
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/objective.tcl,v
retrieving revision 1.1.2.15
retrieving revision 1.1.2.16
diff -C2 -d -r1.1.2.15 -r1.1.2.16
*** objective.tcl	17 Aug 2006 07:40:24 -0000	1.1.2.15
--- objective.tcl	18 Aug 2006 16:35:37 -0000	1.1.2.16
***************
*** 83,87 ****
  }
  
! rename unknown _original_unknown
  # TODO: remove duplicates in lookup
  # TODO: cache lookup for greater speed
--- 83,87 ----
  }
  
! rename unknown unknown2
  # TODO: remove duplicates in lookup
  # TODO: cache lookup for greater speed
***************
*** 89,95 ****
  	global _ __
  	set self [lindex $args 0]
- 	if {"$self" == ""} {error "null pointer error"}
  	if {[llength [array names _ $self:_class]] == 0} {
! 		return [uplevel 1 [linsert $args 0 _original_unknown]]
  	}
  	set methods {}
--- 89,94 ----
  	global _ __
  	set self [lindex $args 0]
  	if {[llength [array names _ $self:_class]] == 0} {
! 		return [uplevel 1 [linsert $args 0 unknown2]]
  	}
  	set methods {}
***************
*** 108,114 ****
  		error "no such method '$selector' for object '$self'\nwith ancestors {$ancestors}"
  	}
! 	set name [lindex $methods $i]
! 	set r [eval [concat [list $name $self] [lrange $args 2 end]]]
! 	return $r
  }
  
--- 107,111 ----
  		error "no such method '$selector' for object '$self'\nwith ancestors {$ancestors}"
  	}
! 	eval [concat [list [lindex $methods $i] $self] [lrange $args 2 end]]
  }
  
***************
*** 117,122 ****
  	set i [expr 1+$oi]
  	if {[llength $methods] < $i} {error "no more supermethods"}
! 	set name [lindex $methods $i]
! 	set r [eval [concat [list $name $self] $args]]
  }
  
--- 114,118 ----
  	set i [expr 1+$oi]
  	if {[llength $methods] < $i} {error "no more supermethods"}
! 	eval [concat [list [lindex $methods $i] $self] $args]
  }
  





More information about the Pd-cvs mailing list