Bump version number for 1.9.3.
[bpt/guile.git] / libguile / backtrace.c
index 418b6d7..8357905 100644 (file)
@@ -2,18 +2,19 @@
  * Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006 Free Software Foundation
  *
  * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
  *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
  */
 
 #ifdef HAVE_CONFIG_H
@@ -473,14 +474,14 @@ display_backtrace_get_file_line (SCM frame, SCM *file, SCM *line)
       *file = scm_source_property (source, scm_sym_filename);
       *line = scm_source_property (source, scm_sym_line);
     }
-  else if (scm_is_vector (source))
+  else if (scm_is_pair (source)
+           && scm_is_pair (scm_cdr (source))
+           && scm_is_pair (scm_cddr (source))
+           && !scm_is_pair (scm_cdddr (source)))
     {
-      /* #(line column file), from VM compilation */
-      size_t len = scm_c_vector_length (source);
-      if (len >= 3)
-        *file = scm_c_vector_ref (source, 2);
-      if (len >= 1)
-        *line = scm_c_vector_ref (source, 0);
+      /* (addr . (filename . (line . column))), from vm compilation */
+      *file = scm_cadr (source);
+      *line = scm_caddr (source);
     }
 }