Free the iterator when Im done.
This commit is contained in:
parent
e6db4113a5
commit
9e63c88809
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: a_fetch_tfarg.c,v 1.4 2003/03/13 04:35:09 steve Exp $"
|
||||
#ident "$Id: a_fetch_tfarg.c,v 1.5 2003/03/14 04:58:50 steve Exp $"
|
||||
#endif
|
||||
|
||||
#include <vpi_user.h>
|
||||
|
|
@ -43,6 +43,7 @@ int acc_fetch_tfarg_int(int n)
|
|||
value.format=vpiIntVal;
|
||||
vpi_get_value(arg_h, &value);
|
||||
rtn = value.value.integer;
|
||||
vpi_free_object(sys_i);
|
||||
} else {
|
||||
rtn = 0;
|
||||
}
|
||||
|
|
@ -78,6 +79,9 @@ char *acc_fetch_tfarg_str(int n)
|
|||
|
||||
/*
|
||||
* $Log: a_fetch_tfarg.c,v $
|
||||
* Revision 1.5 2003/03/14 04:58:50 steve
|
||||
* Free the iterator when Im done.
|
||||
*
|
||||
* Revision 1.4 2003/03/13 04:35:09 steve
|
||||
* Add a bunch of new acc_ and tf_ functions.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: a_handle_tfarg.c,v 1.3 2003/02/17 06:39:47 steve Exp $"
|
||||
#ident "$Id: a_handle_tfarg.c,v 1.4 2003/03/14 04:58:50 steve Exp $"
|
||||
#endif
|
||||
|
||||
#include <acc_user.h>
|
||||
|
|
@ -37,8 +37,13 @@ handle acc_handle_tfarg(int n)
|
|||
/* find nth arg */
|
||||
while (n > 0) {
|
||||
rtn_h = vpi_scan(sys_i);
|
||||
if (rtn_h == 0)
|
||||
break;
|
||||
n--;
|
||||
}
|
||||
|
||||
if (rtn_h) vpi_free_object(sys_i);
|
||||
|
||||
} else {
|
||||
rtn_h = (vpiHandle) 0;
|
||||
}
|
||||
|
|
@ -53,6 +58,9 @@ handle acc_handle_tfinst(void)
|
|||
|
||||
/*
|
||||
* $Log: a_handle_tfarg.c,v $
|
||||
* Revision 1.4 2003/03/14 04:58:50 steve
|
||||
* Free the iterator when Im done.
|
||||
*
|
||||
* Revision 1.3 2003/02/17 06:39:47 steve
|
||||
* Add at least minimal implementations for several
|
||||
* acc_ functions. Add support for standard ACC
|
||||
|
|
|
|||
Loading…
Reference in New Issue