1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-18 09:40:25 +02:00

Add `scm_t_subr' typedef (fix bug #23681).

* libguile/__scm.h (scm_t_subr): New typedef.

* libguile/deprecated.h (scm_make_gsubr, scm_make_gsubr_with_generic,
  scm_call_catching_errors): Use it.

* libguile/gsubr.h (scm_c_make_gsubr, scm_c_define_gsubr,
  scm_c_define_gsubr_with_generic): Likewise.

* libguile/smob.h (scm_smob_descriptor)[apply]: Likewise.
  (scm_set_smob_apply): Likewise.

* libguile/snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Likewise.
This commit is contained in:
Ludovic Courtès 2011-02-13 14:50:05 +01:00
parent 10b9343f04
commit be90d0b6f9
5 changed files with 35 additions and 24 deletions

View file

@ -3,7 +3,8 @@
#ifndef SCM___SCM_H
#define SCM___SCM_H
/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2003, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
/* Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2006,
* 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@ -424,6 +425,19 @@
#include "libguile/tags.h"
/* The type of subrs, i.e., Scheme procedures implemented in C. Empty
function declarators are used internally for pointers to functions of
any arity. However, these are equivalent to `(void)' in C++, are
obsolescent as of C99, and trigger `strict-prototypes' GCC warnings
(bug #23681). */
#ifdef BUILDING_LIBGUILE
typedef SCM (* scm_t_subr) ();
#else
typedef void *scm_t_subr;
#endif
#ifdef vms
# ifndef CHEAP_CONTINUATIONS