1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

* Introduce SCM_UNUSED and mark unused function parameters.

* Introduce SCM_DEBUG_PAIR_ACCESSES.
* Extend the possibilities of SCM_DEBUG_CELL_ACCESSES.
This commit is contained in:
Dirk Herrmann 2001-06-07 21:12:19 +00:00
parent 563058efbe
commit e81d98ec2d
39 changed files with 378 additions and 139 deletions

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1995,1996, 2000 Free Software Foundation, Inc.
/* Copyright (C) 1995,1996,2000,2001 Free Software Foundation, Inc.
*
* 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
@ -54,6 +54,20 @@
/* {Pairs}
*/
#if (SCM_DEBUG_PAIR_ACCESSES == 1)
#include "libguile/ports.h"
#include "libguile/strings.h"
void scm_error_pair_access (SCM non_pair)
{
SCM message = scm_makfrom0str ("Non-pair accessed with SCM_C[AD]R: `~S´\n");
scm_simple_format (scm_current_error_port (), message, SCM_LIST1 (non_pair));
abort ();
}
#endif
SCM_DEFINE (scm_cons, "cons", 2, 0, 0,
(SCM x, SCM y),
"Return a newly allocated pair whose car is @var{x} and whose\n"