This is the mail archive of the kawa@sourceware.org mailing list for the Kawa 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: string-contains and srfi-13


On Dec 22, 2011, at 2:50 PM, I wrote:

This is a bug we inherited from the reference implementation. The helper function
string-parse-start+end is documented to return three values: "rest start end",
but within make-kmp-restart-vector (which appears about 5 levels down in your
stack trace) its result is bound to two variables (start end). The same error
exists in string-kmp-partial-search.


I believe that in both of those places the call to string-parse-start +end should
be replaced by a call to string-parse-final-start+end, which strips off the first
unwanted rest value.

OK, I was mistaken. It's actually a bug in Kawa's let-optionals* (which I wrote,
oops), combined with a bit of under-specification in the SRFI 13 reference
documentation.


In the short term, applying my s/string-parse-start+end/string-parse- final-start+end/g
patch will work; in the longer term, I could fix let-optionals* to match the
authoritative behavior (as documented in the scsh source), but it probably makes
more sense to rewrite the SRFI 13 functions to use Kawa's native support for
#!optional arguments.


-Jamie

--
Jamison Hope
The PTR Group
www.theptrgroup.com




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