vpip_make_binary_const cannot free the string passed in to it.
This commit is contained in:
parent
abaeb1e702
commit
31914c7fcd
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: parse.y,v 1.90 2007/04/10 01:26:16 steve Exp $"
|
||||
#ident "$Id: parse.y,v 1.91 2007/04/12 04:25:58 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "parse_misc.h"
|
||||
|
|
@ -668,7 +668,9 @@ argument
|
|||
: T_STRING
|
||||
{ $$ = vpip_make_string_const($1); }
|
||||
| T_VECTOR
|
||||
{ $$ = vpip_make_binary_const($1.idx, $1.text); }
|
||||
{ $$ = vpip_make_binary_const($1.idx, $1.text);
|
||||
free($1.text);
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
|
|
@ -816,6 +818,9 @@ int compile_design(const char*path)
|
|||
|
||||
/*
|
||||
* $Log: parse.y,v $
|
||||
* Revision 1.91 2007/04/12 04:25:58 steve
|
||||
* vpip_make_binary_const cannot free the string passed in to it.
|
||||
*
|
||||
* Revision 1.90 2007/04/10 01:26:16 steve
|
||||
* variable arrays generated without writing a record for each word.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: vpi_const.cc,v 1.37 2007/02/25 23:08:24 steve Exp $"
|
||||
#ident "$Id: vpi_const.cc,v 1.38 2007/04/12 04:25:58 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "vpi_priv.h"
|
||||
|
|
@ -350,7 +350,7 @@ static const struct __vpirt vpip_binary_rt = {
|
|||
* ASCII string, with each letter a 4-value bit. The first character
|
||||
* may be an 's' if the vector is signed.
|
||||
*/
|
||||
vpiHandle vpip_make_binary_const(unsigned wid, char*bits)
|
||||
vpiHandle vpip_make_binary_const(unsigned wid, const char*bits)
|
||||
{
|
||||
struct __vpiBinaryConst*obj;
|
||||
|
||||
|
|
@ -387,7 +387,6 @@ vpiHandle vpip_make_binary_const(unsigned wid, char*bits)
|
|||
obj->bits.set_bit(idx, val);
|
||||
}
|
||||
|
||||
free(bits);
|
||||
return &(obj->base);
|
||||
}
|
||||
|
||||
|
|
@ -618,6 +617,9 @@ vpiHandle vpip_make_real_const(double value)
|
|||
|
||||
/*
|
||||
* $Log: vpi_const.cc,v $
|
||||
* Revision 1.38 2007/04/12 04:25:58 steve
|
||||
* vpip_make_binary_const cannot free the string passed in to it.
|
||||
*
|
||||
* Revision 1.37 2007/02/25 23:08:24 steve
|
||||
* Process Verilog escape sequences much earlier.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: vpi_priv.h,v 1.73 2007/02/25 23:08:24 steve Exp $"
|
||||
#ident "$Id: vpi_priv.h,v 1.74 2007/04/12 04:25:59 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "vpi_user.h"
|
||||
|
|
@ -308,7 +308,7 @@ struct __vpiBinaryConst {
|
|||
int sized_flag :1;
|
||||
};
|
||||
|
||||
vpiHandle vpip_make_binary_const(unsigned wid, char*bits);
|
||||
vpiHandle vpip_make_binary_const(unsigned wid, const char*bits);
|
||||
vpiHandle vpip_make_binary_param(char*name, const vvp_vector4_t&bits,
|
||||
bool signed_flag);
|
||||
|
||||
|
|
@ -451,6 +451,9 @@ extern char *need_result_buf(unsigned cnt, vpi_rbuf_t type);
|
|||
|
||||
/*
|
||||
* $Log: vpi_priv.h,v $
|
||||
* Revision 1.74 2007/04/12 04:25:59 steve
|
||||
* vpip_make_binary_const cannot free the string passed in to it.
|
||||
*
|
||||
* Revision 1.73 2007/02/25 23:08:24 steve
|
||||
* Process Verilog escape sequences much earlier.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue