[tor-bugs] #4229 [Tor Client]: smartlist_len returns a (signed) int

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Fri Dec 2 21:37:00 UTC 2011


#4229: smartlist_len returns a (signed) int
------------------------+---------------------------------------------------
 Reporter:  rransom     |          Owner:                  
     Type:  defect      |         Status:  new             
 Priority:  major       |      Milestone:  Tor: unspecified
Component:  Tor Client  |        Version:                  
 Keywords:              |         Parent:                  
   Points:              |   Actualpoints:                  
------------------------+---------------------------------------------------
Changes (by nickm):

  * milestone:  Tor: 0.2.3.x-final => Tor: unspecified


Comment:

 At the moment, actually, thanks to the smartlist_ensure_capacity fixes, we
 have the property that the capacity of a smartlist can never be more than
 INT_MAX .  So it's okay to return an int for smartlist_len.  I'm throwing
 this out of 0.2.3.x; it's a big refactoring, and I'm pretty sure that we
 don't actually *want* to allow a smartlist to have anything close to
 INT_MAX entries.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/4229#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list