From 222f15c2932c2adbb184bedb3c3cece32836f562 Mon Sep 17 00:00:00 2001 From: steve Date: Sun, 2 Feb 2003 01:40:24 +0000 Subject: [PATCH] Five vpi_free_object a default behavior. --- vvp/vpi_event.cc | 16 +++++----------- vvp/vpi_memory.cc | 7 +++++-- vvp/vpi_priv.cc | 9 +++++++-- vvp/vpi_real.cc | 12 +++++------- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/vvp/vpi_event.cc b/vvp/vpi_event.cc index dc69881090..9b218ea240 100644 --- a/vvp/vpi_event.cc +++ b/vvp/vpi_event.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: vpi_event.cc,v 1.5 2002/08/12 01:35:08 steve Exp $" +#ident "$Id: vpi_event.cc,v 1.6 2003/02/02 01:40:24 steve Exp $" #endif # include "vpi_priv.h" @@ -71,15 +71,6 @@ static vpiHandle named_event_get_handle(int code, vpiHandle ref) return 0; } -/* - * We keep the object around, in case we need it again. It's all we - * can do, because it cannot be recreated. - */ -static int named_event_free_object(vpiHandle) -{ - return 0; -} - static const struct __vpirt vpip_named_event_rt = { vpiNamedEvent, @@ -92,7 +83,7 @@ static const struct __vpirt vpip_named_event_rt = { 0, 0, - named_event_free_object + 0 }; vpiHandle vpip_make_named_event(const char*name) @@ -124,6 +115,9 @@ void vpip_run_named_event_callbacks(vpiHandle ref) /* * $Log: vpi_event.cc,v $ + * Revision 1.6 2003/02/02 01:40:24 steve + * Five vpi_free_object a default behavior. + * * Revision 1.5 2002/08/12 01:35:08 steve * conditional ident string using autoconfig. * diff --git a/vvp/vpi_memory.cc b/vvp/vpi_memory.cc index 70aa97f441..4dbb207274 100644 --- a/vvp/vpi_memory.cc +++ b/vvp/vpi_memory.cc @@ -27,7 +27,7 @@ * Picture Elements, Inc., 777 Panoramic Way, Berkeley, CA 94704. */ #ifdef HAVE_CVS_IDENT -#ident "$Id: vpi_memory.cc,v 1.20 2002/09/12 15:13:07 steve Exp $" +#ident "$Id: vpi_memory.cc,v 1.21 2003/02/02 01:40:24 steve Exp $" #endif # include "vpi_priv.h" @@ -145,7 +145,7 @@ static vpiHandle memory_scan(vpiHandle ref, int) static int mem_iter_free_object(vpiHandle ref) { free(ref); - return 0; + return 1; } static const struct __vpirt vpip_mem_iter_rt = { @@ -586,6 +586,9 @@ vpiHandle vpip_make_memory(vvp_memory_t mem) /* * $Log: vpi_memory.cc,v $ + * Revision 1.21 2003/02/02 01:40:24 steve + * Five vpi_free_object a default behavior. + * * Revision 1.20 2002/09/12 15:13:07 steve * Account for buffer overrun in memory word names. * diff --git a/vvp/vpi_priv.cc b/vvp/vpi_priv.cc index cae3612bb1..972d1546eb 100644 --- a/vvp/vpi_priv.cc +++ b/vvp/vpi_priv.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: vpi_priv.cc,v 1.28 2003/01/10 19:02:21 steve Exp $" +#ident "$Id: vpi_priv.cc,v 1.29 2003/02/02 01:40:24 steve Exp $" #endif # include "vpi_priv.h" @@ -94,7 +94,9 @@ struct __vpiSysTaskCall*vpip_cur_task = 0; int vpi_free_object(vpiHandle ref) { assert(ref); - assert(ref->vpi_type->vpi_free_object_); + if (ref->vpi_type->vpi_free_object_ == 0) + return 1; + return ref->vpi_type->vpi_free_object_(ref); } @@ -393,6 +395,9 @@ extern "C" void vpi_control(int operation, ...) /* * $Log: vpi_priv.cc,v $ + * Revision 1.29 2003/02/02 01:40:24 steve + * Five vpi_free_object a default behavior. + * * Revision 1.28 2003/01/10 19:02:21 steve * Add missing vpi entry points. * diff --git a/vvp/vpi_real.cc b/vvp/vpi_real.cc index e720e5a5cb..456df4dfcb 100644 --- a/vvp/vpi_real.cc +++ b/vvp/vpi_real.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: vpi_real.cc,v 1.2 2003/01/27 00:14:37 steve Exp $" +#ident "$Id: vpi_real.cc,v 1.3 2003/02/02 01:40:24 steve Exp $" #endif # include "vpi_priv.h" @@ -72,11 +72,6 @@ static vpiHandle real_var_put_value(vpiHandle ref, p_vpi_value vp, return 0; } -static int real_var_free_object(vpiHandle) -{ - return 0; -} - static const struct __vpirt vpip_real_var_rt = { vpiRealVar, @@ -89,7 +84,7 @@ static const struct __vpirt vpip_real_var_rt = { 0, 0, - real_var_free_object + 0 }; vpiHandle vpip_make_real_var(const char*name) @@ -106,6 +101,9 @@ vpiHandle vpip_make_real_var(const char*name) /* * $Log: vpi_real.cc,v $ + * Revision 1.3 2003/02/02 01:40:24 steve + * Five vpi_free_object a default behavior. + * * Revision 1.2 2003/01/27 00:14:37 steve * Support in various contexts the $realtime * system task.