@@ -476,8 +476,8 @@ static bool prepare_nf_input(vector< vector< NumberFieldElem > >& out,
476
476
current_elem = NumberFieldElem (*nf, current_vector);
477
477
}
478
478
if (string_check (current_element)) {
479
- current_elem = NumberFieldElem (*nf);
480
- current_elem = PyUnicodeToString (current_element);
479
+ current_elem = NumberFieldElem (*nf, PyUnicodeToString (current_element) );
480
+ // current_elem = PyUnicodeToString(current_element);
481
481
}
482
482
if (PyFloat_Check (current_element)){
483
483
throw PyNormalizInputException (" Nonintegral numbers must be given as strings" );
@@ -1045,15 +1045,13 @@ static PyObject* _NmzConeIntern_renf(PyObject* kwargs)
1045
1045
return NULL ;
1046
1046
}
1047
1047
1048
-
1049
- renf_class* renf;
1050
1048
// number_field_data contains 3 entries: poly, var, emb
1051
1049
// All are strings
1052
1050
string poly = PyUnicodeToString (PySequence_GetItem (number_field_data, 0 ));
1053
1051
string var = PyUnicodeToString (PySequence_GetItem (number_field_data, 1 ));
1054
1052
string emb = PyUnicodeToString (PySequence_GetItem (number_field_data, 2 ));
1055
- // std::shared_ptr <const renf_class>* renf = new std::shared_ptr <const renf_class>;
1056
- std::shared_ptr <const renf_class> renf = renf_class::make (poly, var, emb);
1053
+ // boost::intrusive_ptr <const renf_class>* renf = new boost::intrusive_ptr <const renf_class>;
1054
+ boost::intrusive_ptr <const renf_class> renf = renf_class::make (poly, var, emb);
1057
1055
const renf_class* my_renf = renf.get ();
1058
1056
1059
1057
map< InputType, vector< vector< renf_elem_class > > > input;
@@ -1076,7 +1074,7 @@ static PyObject* _NmzConeIntern_renf(PyObject* kwargs)
1076
1074
continue ;
1077
1075
vector< vector< renf_elem_class > > Mat;
1078
1076
try {
1079
- prepare_nf_input (Mat, current_value, renf );
1077
+ prepare_nf_input (Mat, current_value, my_renf );
1080
1078
}
1081
1079
catch (PyNormalizInputException& e) {
1082
1080
PyErr_SetString (PyNormaliz_cppError,
@@ -2505,7 +2503,7 @@ static PyObject* NmzGetRenfInfo(PyObject* self, PyObject* args)
2505
2503
}
2506
2504
const renf_class* renf = get_cone_renf_renf (cone_py);
2507
2505
std::string minpoly_str;
2508
- minpoly_str = fmpq_poly_get_str_pretty (renf->get_renf ()->nf ->pol , renf->gen_name .c_str ());
2506
+ minpoly_str = fmpq_poly_get_str_pretty (renf->get_renf ()->nf ->pol , renf->gen_name () .c_str ());
2509
2507
std::string res1 = arb_get_str (renf->get_renf ()->emb , 64 , 0 );
2510
2508
// long prec = renf->get_renf()->prec;
2511
2509
return PyTuple_Pack (2 , StringToPyUnicode (minpoly_str), StringToPyUnicode (res1));
0 commit comments