mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 18:31:49 +00:00
fixed bug in generated code
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
ed97a3a180
commit
840d0aef6d
|
@ -1507,7 +1507,7 @@ def def_module_params(module_name, export, params, class_name=None, description=
|
|||
out.write(' params_ref const & p;\n')
|
||||
if export:
|
||||
out.write(' params_ref g;\n')
|
||||
out.write(' %s(params_ref const & _p = params_ref()):\n' % class_name)
|
||||
out.write(' %s(params_ref const & _p = params_ref::get_empty()):\n' % class_name)
|
||||
out.write(' p(_p)')
|
||||
if export:
|
||||
out.write(', g(gparams::get_module("%s"))' % module_name)
|
||||
|
|
|
@ -21,6 +21,8 @@ Notes:
|
|||
#include"symbol.h"
|
||||
#include"dictionary.h"
|
||||
|
||||
params_ref params_ref::g_empty_params_ref;
|
||||
|
||||
std::string norm_param_name(char const * n) {
|
||||
if (n == 0)
|
||||
return "_";
|
||||
|
|
|
@ -31,6 +31,8 @@ class params;
|
|||
class param_descrs;
|
||||
|
||||
class params_ref {
|
||||
static params_ref g_empty_params_ref;
|
||||
|
||||
params * m_params;
|
||||
void init();
|
||||
void copy_core(params const * p);
|
||||
|
@ -38,7 +40,9 @@ public:
|
|||
params_ref():m_params(0) {}
|
||||
params_ref(params_ref const & p);
|
||||
~params_ref();
|
||||
|
||||
|
||||
static params_ref const & get_empty() { return g_empty_params_ref; }
|
||||
|
||||
params_ref & operator=(params_ref const & p);
|
||||
|
||||
// copy params from src
|
||||
|
|
Loading…
Reference in a new issue