[Xapian-tickets] [Xapian] #555: API docs don't make the maximum value number clear

Xapian nobody at xapian.org
Thu Aug 4 05:59:22 BST 2011


#555: API docs don't make the maximum value number clear
---------------------------+------------------------------------------------
 Reporter:  james          |       Owner:  olly 
     Type:  defect         |      Status:  new  
 Priority:  normal         |   Milestone:  1.3.0
Component:  Documentation  |     Version:       
 Severity:  major          |    Keywords:       
Blockedby:                 |    Platform:  All  
 Blocking:                 |  
---------------------------+------------------------------------------------

Comment(by richard):

 Some discussion on IRC with Olly just now.  Summary I think is:

  - C9X inttypes.h still isn't safe to rely on being available, we think.

  - workarounds for that will probably involve generating header files from
 configure, which will get messy (and need further custom work for
 windows).

  - instead, it's probably better to add a compile-time assert that
 unsigned has 32-bit unsigned range (which it will on all platforms we
 currently care about), and to document that a 32-bit unsigned range can be
 relied on for valueno.

 The only other risk I can see associated with valueno being a variably
 sized value is if users serialise BAD_VALUENO on one platform (say, to a
 decimal representation), and then unserialise it on another with a
 larger/smaller unsigned size, they may get a valid valueno in return.  Not
 sure if this is likely, or to be an issue, but its probably something else
 we should document too.

-- 
Ticket URL: <http://trac.xapian.org/ticket/555#comment:1>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list