| 59 | } |
| 60 | |
| 61 | static std::vector<ObjectVector>::size_type convertIndex( ObjectVector &o, int64_t index ) |
| 62 | { |
| 63 | int64_t s = o.members().size(); |
| 64 | |
| 65 | if( index < 0 ) |
| 66 | { |
| 67 | index += s; |
| 68 | } |
| 69 | |
| 70 | if( index >= s || index < 0 ) |
| 71 | { |
| 72 | PyErr_SetString( PyExc_IndexError, "Index out of range" ); |
| 73 | throw_error_already_set(); |
| 74 | } |
| 75 | |
| 76 | return index; |
| 77 | } |
| 78 | |
| 79 | static std::string repr( ObjectVector &o ) |
| 80 | { |