From ec48049a69e1bfff4870e84e415ada9bc0cd2fa0 Mon Sep 17 00:00:00 2001 From: steve Date: Mon, 17 Feb 2003 00:58:38 +0000 Subject: [PATCH] Strict correctness of vpi_free_object results. --- vvp/vpi_callback.cc | 11 +++++++---- vvp/vpi_iter.cc | 7 +++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/vvp/vpi_callback.cc b/vvp/vpi_callback.cc index 9a5747ac0..3afb0292d 100644 --- a/vvp/vpi_callback.cc +++ b/vvp/vpi_callback.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001 Stephen Williams (steve@icarus.com) + * Copyright (c) 2001-2003 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: vpi_callback.cc,v 1.27 2003/02/10 05:20:10 steve Exp $" +#ident "$Id: vpi_callback.cc,v 1.28 2003/02/17 00:58:38 steve Exp $" #endif /* @@ -45,7 +45,7 @@ static int free_simple_callback(vpiHandle ref) assert(ref->vpi_type); assert(ref->vpi_type->type_code == vpiCallback); delete ref; - return 0; + return 1; } const struct __vpirt callback_rt = { @@ -465,7 +465,7 @@ int vpi_remove_cb(vpiHandle ref) struct __vpiCallback*obj = (struct __vpiCallback*)ref; obj->cb_data.cb_rtn = 0; - return 0; + return 1; } void callback_execute(struct __vpiCallback*cur) @@ -534,6 +534,9 @@ void callback_functor_s::set(vvp_ipoint_t, bool, unsigned val, unsigned) /* * $Log: vpi_callback.cc,v $ + * Revision 1.28 2003/02/17 00:58:38 steve + * Strict correctness of vpi_free_object results. + * * Revision 1.27 2003/02/10 05:20:10 steve * Add value change callbacks to real variables. * diff --git a/vvp/vpi_iter.cc b/vvp/vpi_iter.cc index 433294ca4..8a9978b7b 100644 --- a/vvp/vpi_iter.cc +++ b/vvp/vpi_iter.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: vpi_iter.cc,v 1.5 2002/08/12 01:35:09 steve Exp $" +#ident "$Id: vpi_iter.cc,v 1.6 2003/02/17 00:58:38 steve Exp $" #endif /* @@ -37,7 +37,7 @@ static int iterator_free_object(vpiHandle ref) free(hp->args); free(hp); - return 0; + return 1; } static const struct __vpirt vpip_iterator_rt = { @@ -90,6 +90,9 @@ vpiHandle vpi_scan(vpiHandle ref) /* * $Log: vpi_iter.cc,v $ + * Revision 1.6 2003/02/17 00:58:38 steve + * Strict correctness of vpi_free_object results. + * * Revision 1.5 2002/08/12 01:35:09 steve * conditional ident string using autoconfig. *