mirror of
https://github.com/boostorg/python.git
synced 2026-01-24 06:02:14 +00:00
Rename CamelCase variable and function names
[SVN r20386]
This commit is contained in:
@@ -63,9 +63,9 @@ boost::python::indexing::python_iterator::~python_iterator ()
|
||||
|
||||
boost::python::indexing::python_getitem_iterator
|
||||
::python_getitem_iterator (boost::python::object obj)
|
||||
: mGetitemMethod (obj.attr ("__getitem__"))
|
||||
, mIndex (0)
|
||||
, mCurrent()
|
||||
: m_getitem_method (obj.attr ("__getitem__"))
|
||||
, m_index (0)
|
||||
, m_current()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -79,8 +79,8 @@ bool boost::python::indexing::python_getitem_iterator::next ()
|
||||
|
||||
try
|
||||
{
|
||||
mCurrent = mGetitemMethod (mIndex);
|
||||
++mIndex;
|
||||
m_current = m_getitem_method (m_index);
|
||||
++m_index;
|
||||
}
|
||||
|
||||
catch (boost::python::error_already_set const &)
|
||||
@@ -89,7 +89,7 @@ bool boost::python::indexing::python_getitem_iterator::next ()
|
||||
{
|
||||
// Eat this exception
|
||||
PyErr_Clear ();
|
||||
mCurrent = boost::python::object ();
|
||||
m_current = boost::python::object ();
|
||||
result = false;
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ bool boost::python::indexing::python_getitem_iterator::next ()
|
||||
boost::python::object
|
||||
boost::python::indexing::python_getitem_iterator::current () const
|
||||
{
|
||||
return mCurrent;
|
||||
return m_current;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
@@ -119,8 +119,8 @@ boost::python::indexing::python_getitem_iterator::current () const
|
||||
|
||||
boost::python::indexing::python_iter_iterator
|
||||
::python_iter_iterator (boost::python::object obj)
|
||||
: mNextMethod (obj.attr ("__iter__")().attr ("next"))
|
||||
, mCurrent()
|
||||
: m_next_method (obj.attr ("__iter__")().attr ("next"))
|
||||
, m_current()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ bool boost::python::indexing::python_iter_iterator::next ()
|
||||
|
||||
try
|
||||
{
|
||||
mCurrent = mNextMethod ();
|
||||
m_current = m_next_method ();
|
||||
}
|
||||
|
||||
catch (boost::python::error_already_set const &)
|
||||
@@ -143,7 +143,7 @@ bool boost::python::indexing::python_iter_iterator::next ()
|
||||
{
|
||||
// Eat this exception
|
||||
PyErr_Clear ();
|
||||
mCurrent = boost::python::object ();
|
||||
m_current = boost::python::object ();
|
||||
result = false;
|
||||
}
|
||||
|
||||
@@ -164,5 +164,5 @@ bool boost::python::indexing::python_iter_iterator::next ()
|
||||
boost::python::object
|
||||
boost::python::indexing::python_iter_iterator::current () const
|
||||
{
|
||||
return mCurrent;
|
||||
return m_current;
|
||||
}
|
||||
|
||||
@@ -32,26 +32,26 @@ boost::python::indexing::slice::slice (slice const ©)
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
boost::python::indexing::integer_slice
|
||||
::integer_slice (slice const &sl, index_type sequenceLength)
|
||||
: mSlice (sl)
|
||||
::integer_slice (slice const &sl, index_type length)
|
||||
: m_slice (sl)
|
||||
// Leave index members uninitialized
|
||||
{
|
||||
PySlice_GetIndices (reinterpret_cast<PySliceObject *> (mSlice.ptr())
|
||||
, sequenceLength
|
||||
, &mStart
|
||||
, &mStop
|
||||
, &mStep);
|
||||
PySlice_GetIndices (reinterpret_cast<PySliceObject *> (m_slice.ptr())
|
||||
, length
|
||||
, &m_start
|
||||
, &m_stop
|
||||
, &m_step);
|
||||
|
||||
if (mStep == 0)
|
||||
if (m_step == 0)
|
||||
{
|
||||
// Can happen with Python prior to 2.3
|
||||
PyErr_SetString (PyExc_ValueError, "slice step cannot be zero");
|
||||
boost::python::throw_error_already_set ();
|
||||
}
|
||||
|
||||
mStart = std::max (0, std::min (sequenceLength, mStart));
|
||||
mStop = std::max (0, std::min (sequenceLength, mStop));
|
||||
mDirection = (mStep > 0) ? 1 : -1;
|
||||
m_start = std::max (0, std::min (length, m_start));
|
||||
m_stop = std::max (0, std::min (length, m_stop));
|
||||
m_direction = (m_step > 0) ? 1 : -1;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -60,5 +60,5 @@ boost::python::indexing::integer_slice
|
||||
|
||||
bool boost::python::indexing::integer_slice::in_range (index_type index)
|
||||
{
|
||||
return ((mStop - index) * mDirection) > 0;
|
||||
return ((m_stop - index) * m_direction) > 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user