Commit e2d06b8c authored by Erick's avatar Erick

Applied bug fixes provided by Christopher Oliver.

The fixes are
    - infinite loop when reading bad closing parenthesis
    - SRFI-62 comments at end of file yield an error
    - Fixed an error in define-generic macro
    - Improper parameter lists were not correctly handled in
      method-more-specific?
parent 6eb2460a
;;;;
;;;; object.stk -- -- A variation of the Gregor Kickzales Tiny CLOS for STklos
;;;;
;;;; Copyright 1993-2008 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
;;;; Copyright 1993-2009 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
;;;;
;;;;
;;;; This program is free software; you can redistribute it and/or modify
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [eg@unice.fr]
;;;; Creation date: 20-Feb-1994 21:09
;;;; Last file update: 11-Jan-2008 14:50 (eg)
;;;; Last file update: 19-Apr-2009 00:00 (eg)
#|
......@@ -407,7 +407,7 @@
;=============================================================================
; ==== Define-generic
(define-macro (define-generic gf :optional (meta <generic>))
(define-macro (define-generic gf :optional (meta '<generic>))
`(define ,gf (ensure-generic-function ',gf ,meta)))
;==== Ensure-generic-function
......
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@
*
* o b j e c t . c -- Objects support
*
* Copyright 1994-2008 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
* Copyright 1994-2009 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -21,7 +21,7 @@
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 9-Feb-1994 15:56
* Last file update: 2-Jun-2008 14:48 (eg)
* Last file update: 19-Apr-2009 12:11 (eg)
*/
#include "stklos.h"
......@@ -213,6 +213,11 @@ static int more_specificp(SCM m1, SCM m2, SCM *targs)
for (s1=SPEC_OF(m1), s2=SPEC_OF(m2); ; targs++,s1=CDR(s1),s2=CDR(s2)) {
if (NULLP(s1)) return 1;
if (NULLP(s2)) return 0;
/* Variadic specializers aren't proper lists. */
if (!CONSP(s1)) return 0;
if (!CONSP(s2)) return 1;
if (CAR(s1) != CAR(s2)) {
register SCM l, cs1 = CAR(s1), cs2 = CAR(s2);
......
/*
* r e a d . c -- reading stuff
*
* Copyright 1993-2007 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
* Copyright 1993-2009 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -20,7 +20,7 @@
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: ??-Oct-1993 ??:??
* Last file update: 9-Dec-2007 20:35 (eg)
* Last file update: 19-Apr-2009 11:42 (eg)
*
*/
......@@ -140,6 +140,7 @@ Top:
return STk_nil;
else {
warning_parenthesis(port);
c = delim;
goto Top;
}
}
......@@ -528,6 +529,8 @@ static SCM read_rec(SCM port, struct read_context *ctx, int inlist)
c = flush_spaces(port, (char *) NULL, (SCM) NULL);
switch (c) {
case EOF:
return STk_eof;
case '(':
return(read_list(port, ')', ctx));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment