| 186 | } |
| 187 | |
| 188 | static PyObject * |
| 189 | env_open(UpsEnvironment *self, PyObject *args) |
| 190 | { |
| 191 | ups_status_t st; |
| 192 | const char *filename = 0; |
| 193 | uint32_t flags = 0; |
| 194 | PyObject *extargs = 0; |
| 195 | std::vector<ups_parameter_t> params; |
| 196 | |
| 197 | if (!PyArg_ParseTuple(args, "|ziO!:open", &filename, &flags, |
| 198 | &PyTuple_Type, &extargs)) |
| 199 | return (0); |
| 200 | |
| 201 | if (extargs) { |
| 202 | if (!parse_parameters(extargs, params)) |
| 203 | return (0); |
| 204 | } |
| 205 | |
| 206 | st = ups_env_open(&self->env, filename, flags, extargs ? ¶ms[0] : 0); |
| 207 | if (st) |
| 208 | THROW(st); |
| 209 | |
| 210 | return (Py_BuildValue("")); |
| 211 | } |
| 212 | |
| 213 | static PyObject * |
| 214 | env_close(UpsEnvironment *self, PyObject *args) |
nothing calls this directly
no test coverage detected