On 9/18/07, Marijn Haverbeke marijnh@gmail.com wrote:
Oh, you seem to be under the impression that I actually introduced test cases for the changes -- how naive ;) . I didn't, but a quick
Oh. I thought you reimplemented WITH-CONNECTION using CALL-WITH-CONNECTION (nb. that's a lot better name for that function) in order to avoid code reduplication blahblahblah ;), so the tests for WITH-CONNECTION would reveal any errors. Yeah, I definitely should look more thoroughly at the patches I apply in oder to test them :)
usage of call-with-connection (your with-connection-fun) and with-connection* (a variant of with-connection which evaluates the specification list) should show any problems I introduced. I stared at the code for a few minutes, so it shouldn't contain any glaring mistakes, but you never know.
Apparently, you missed a comma before SPEC in WITH-CONNECTION*, so there was an undefined variable error. After applying the attached patch:
CL-USER> (let ((test "test")) (pomo:with-connection* (list test "richard" "dupa" "localhost") (pomo:query (:select 1)))) ((1)) CL-USER> (let ((test "test")) (pomo:call-with-connection (list test "richard" "dupa" "localhost") (lambda () (pomo:query (:select 1))))) ((1))
I hope it's OK now.
Bests,
-- Richard