[python,guile] Add comment beside conditions testing empty arrays.

gdb/ChangeLog:

        * guile/scm-type.c (tyscm_array_1): Add comment.
        * python/py-type.c (typy_array_1): Add comment.
This commit is contained in:
Joel Brobecker
2015-01-07 07:34:29 +04:00
parent 6f25f22356
commit e810d75b1c
3 changed files with 7 additions and 2 deletions

View File

@@ -713,7 +713,7 @@ tyscm_array_1 (SCM self, SCM n1_scm, SCM n2_scm, int is_vector,
n1 = 0;
}
if (n2 < n1 - 1)
if (n2 < n1 - 1) /* Note: An empty array has n2 == n1 - 1. */
{
gdbscm_out_of_range_error (func_name, SCM_ARG3,
scm_cons (scm_from_long (n1),