return -1;
}
oparg_int = (int)PyLong_AsLong(oparg);
- if ((oparg_int == -1) && PyErr_Occurred())
+ if ((oparg_int == -1) && PyErr_Occurred()) {
return -1;
+ }
}
else if (oparg != Py_None) {
PyErr_SetString(PyExc_ValueError,
return effect;
}
-
-
-
static PyMethodDef
opcode_functions[] = {
_OPCODE_STACK_EFFECT_METHODDEF
{NULL, NULL, 0, NULL}
};
-
static struct PyModuleDef opcodemodule = {
PyModuleDef_HEAD_INIT,
- "_opcode",
- "Opcode support module.",
- -1,
- opcode_functions,
- NULL,
- NULL,
- NULL,
- NULL
+ .m_name = "_opcode",
+ .m_doc = "Opcode support module.",
+ .m_size = 0,
+ .m_methods = opcode_functions
};
PyMODINIT_FUNC
PyInit__opcode(void)
{
- return PyModule_Create(&opcodemodule);
+ return PyModuleDef_Init(&opcodemodule);
}