| 160 | } |
| 161 | |
| 162 | static PyObject * |
| 163 | env_create(UpsEnvironment *self, PyObject *args) |
| 164 | { |
| 165 | ups_status_t st; |
| 166 | const char *filename = 0; |
| 167 | uint32_t mode = 0; |
| 168 | uint32_t flags = 0; |
| 169 | PyObject *extargs = 0; |
| 170 | std::vector<ups_parameter_t> params; |
| 171 | |
| 172 | if (!PyArg_ParseTuple(args, "|ziiO!:create", &filename, &flags, &mode, |
| 173 | &PyTuple_Type, &extargs)) |
| 174 | return (0); |
| 175 | |
| 176 | if (extargs) { |
| 177 | if (!parse_parameters(extargs, params)) |
| 178 | return (0); |
| 179 | } |
| 180 | |
| 181 | st = ups_env_create(&self->env, filename, flags, mode, |
| 182 | extargs ? ¶ms[0] : 0); |
| 183 | if (st) |
| 184 | THROW(st); |
| 185 | return (Py_BuildValue("")); |
| 186 | } |
| 187 | |
| 188 | static PyObject * |
| 189 | env_open(UpsEnvironment *self, PyObject *args) |
nothing calls this directly
no test coverage detected