@@ -476,8 +476,8 @@ static bool prepare_nf_input(vector< vector< NumberFieldElem > >& out,
476476 current_elem = NumberFieldElem (*nf, current_vector);
477477 }
478478 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);
481481 }
482482 if (PyFloat_Check (current_element)){
483483 throw PyNormalizInputException (" Nonintegral numbers must be given as strings" );
@@ -1045,15 +1045,13 @@ static PyObject* _NmzConeIntern_renf(PyObject* kwargs)
10451045 return NULL ;
10461046 }
10471047
1048-
1049- renf_class* renf;
10501048 // number_field_data contains 3 entries: poly, var, emb
10511049 // All are strings
10521050 string poly = PyUnicodeToString (PySequence_GetItem (number_field_data, 0 ));
10531051 string var = PyUnicodeToString (PySequence_GetItem (number_field_data, 1 ));
10541052 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);
10571055 const renf_class* my_renf = renf.get ();
10581056
10591057 map< InputType, vector< vector< renf_elem_class > > > input;
@@ -1076,7 +1074,7 @@ static PyObject* _NmzConeIntern_renf(PyObject* kwargs)
10761074 continue ;
10771075 vector< vector< renf_elem_class > > Mat;
10781076 try {
1079- prepare_nf_input (Mat, current_value, renf );
1077+ prepare_nf_input (Mat, current_value, my_renf );
10801078 }
10811079 catch (PyNormalizInputException& e) {
10821080 PyErr_SetString (PyNormaliz_cppError,
@@ -2505,7 +2503,7 @@ static PyObject* NmzGetRenfInfo(PyObject* self, PyObject* args)
25052503 }
25062504 const renf_class* renf = get_cone_renf_renf (cone_py);
25072505 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 ());
25092507 std::string res1 = arb_get_str (renf->get_renf ()->emb , 64 , 0 );
25102508 // long prec = renf->get_renf()->prec;
25112509 return PyTuple_Pack (2 , StringToPyUnicode (minpoly_str), StringToPyUnicode (res1));
0 commit comments