2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-21 17:12:22 +00:00

VC++ 6.0 fixes and misc. other modifications.

[SVN r9601]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2001-03-20 02:13:28 +00:00
parent db943b4109
commit 1f45a846c6
2 changed files with 5 additions and 6 deletions

View File

@@ -15,7 +15,7 @@ namespace { // Avoid cluttering the global namespace.
vector_double_wrapper(PyObject* self)
: std::vector<double>() {}
vector_double_wrapper(PyObject* self, const int n)
vector_double_wrapper(PyObject* self, int n)
: std::vector<double>(n) {}
vector_double_wrapper(PyObject* self, python::tuple tuple)
@@ -28,17 +28,16 @@ namespace { // Avoid cluttering the global namespace.
}
};
double getitem(const std::vector<double>& vd, const std::size_t key) {
double getitem(const std::vector<double>& vd, std::size_t key) {
return vd[key];
}
void setitem(std::vector<double>& vd, const std::size_t key,
const double &d) {
void setitem(std::vector<double>& vd, std::size_t key, double d) {
std::vector<double>::iterator vditer = vd.begin();
vditer[key] = d;
}
void delitem(std::vector<double>& vd, const std::size_t key) {
void delitem(std::vector<double>& vd, std::size_t key) {
std::vector<double>::iterator vditer = vd.begin();
vd.erase(&vditer[key]);
}