This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [python][patch] Add options length parameter to value.string(...)


>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:

Phil> +   buffer in BUFFER, which should be freed by the caller.  If length
Phil> +   is specified at -1, the string is read until a null character is
Phil> +   found, otherwise the string is read to the length specified.  

This should mention that length is in units of characters.

And, it seems weird that on input length is characters and on output
it is bytes.  Please change this to be characters uniformly.

Phil> +   In the case of length specified as -1, assume strings are
Phil> +   terminated by a null character.  The size of a character is
Phil> +   determined by the length of the target type of the pointer or
Phil> +   array.  This means that a null byte present in a multi-byte
Phil> +   character will not terminate the string unless the whole character
Phil> +   is null.

Delete the last sentence and just add "of the appropriate width" to
the end of the first sentence.  I think that is a bit clearer.

Phil> +If the optional @var{length} argumen is given, the string will be

Typo, should be "argument".

Phil> +       Otherwise LENGTH will equal all characters - including any nulls.

I think change "equal" to "include" here.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]