From 663780bb1c881947b6e4f00c456b2b367701982d Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sat, 30 Mar 2013 23:09:01 -0400 Subject: [PATCH] Add 'scm_gc_typed_calloc' macro. * libguile/gc.h (scm_gc_typed_calloc): New macro. --- libguile/gc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libguile/gc.h b/libguile/gc.h index 9f00e017b..a9a499bca 100644 --- a/libguile/gc.h +++ b/libguile/gc.h @@ -3,7 +3,8 @@ #ifndef SCM_GC_H #define SCM_GC_H -/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, + * 2007, 2008, 2009, 2010, 2011, 2013 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 @@ -207,6 +208,7 @@ SCM_API char *scm_gc_strdup (const char *str, const char *what) SCM_API char *scm_gc_strndup (const char *str, size_t n, const char *what) SCM_MALLOC; +#define scm_gc_typed_calloc(t) ((t *) scm_gc_calloc (sizeof (t), #t)) #ifdef BUILDING_LIBGUILE #include "libguile/bdw-gc.h"