Skip to content

env_binding.c env_init Says 5 Args - Seems to Need 6 #373

@Kinvert

Description

@Kinvert

static PyObject* env_init(PyObject* self, PyObject* args, PyObject* kwargs) {

    if (PyTuple_Size(args) != 6) {
        PyErr_SetString(PyExc_TypeError, "Environment requires 5 arguments");
        return NULL;
    }

but

PyObject* seed_arg = PyTuple_GetItem(args, 5);

    PyObject* seed_arg = PyTuple_GetItem(args, 5);
    if (!PyObject_TypeCheck(seed_arg, &PyLong_Type)) {
        PyErr_SetString(PyExc_TypeError, "seed must be an integer");
        return NULL;
    }
    int seed = PyLong_AsLong(seed_arg);

Seems like it ought to say the environment needs 6 arguments as I think seed needs to be included as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions