Minor cleanups.

This commit is contained in:
Jerry James 2020-07-21 19:44:24 -06:00
parent ebf37bc154
commit 6f582cab93
2 changed files with 2 additions and 4 deletions

View File

@ -36,7 +36,7 @@
/* If rndstr really is a string, extract the first character. */
if (Py2or3String_Check(rndstr)) {
- rnd = Py2or3String_AsString(rndstr)[0];
+ rnd = Py2or3String_1Char(rndstr);
+ rnd = Py2or3String_1Char(rndstr);
}
else {
VALUE_ERROR("invalid rounding mode specified");
@ -89,7 +89,7 @@
switch (PyTuple_GET_SIZE(args)) {
case 4:
- rnd = Py2or3String_AsString(PyTuple_GET_ITEM(args, 3));
+ rnd = Py2or3String_1Char(PyTuple_GET_ITEM(args, 3));
+ rnd = Py2or3String_1Char(PyTuple_GET_ITEM(args, 3));
case 3:
prec = GMPy_Integer_AsMpBitCntAndError(PyTuple_GET_ITEM(args, 2), &error);
if (error)

View File

@ -39,9 +39,7 @@ functionality.
%package -n python3-%{srcname}
Summary: Python 3 interface to GMP, MPFR, and MPC
Provides: bundled(jquery)
%{?python_provide:%python_provide python3-%{srcname}}
%description -n python3-%{srcname}
%{common_desc}