diff --git a/srcgen/codata_constants/cpy_code.f90 b/srcgen/codata_constants/cpy_code.f90 index 8db4d48..5130d57 100644 --- a/srcgen/codata_constants/cpy_code.f90 +++ b/srcgen/codata_constants/cpy_code.f90 @@ -19,13 +19,14 @@ subroutine write_cpython_extension_declaration(fcode) write(fcode, "(A)") "" write(fcode, "(A)") "static PyMethodDef myMethods[] = {{ NULL, NULL, 0, NULL }};" write(fcode, "(A)") "" - write(fcode, "(A)") 'static struct PyModuleDef codata = {PyModuleDef_HEAD_INIT, "codata", module_docstring, -1, myMethods};' + write(fcode, "(A)", advance="NO") 'static struct PyModuleDef constants = ' + write(fcode, "(A)") '{PyModuleDef_HEAD_INIT, "constants", module_docstring, -1, myMethods};' write(fcode, "(A)") "" - write(fcode, "(A)") "PyMODINIT_FUNC PyInit_codata(void){" + write(fcode, "(A)") "PyMODINIT_FUNC PyInit_constants(void){" write(fcode, "(4X, A)") "PyObject *m;" write(fcode, "(4X, A)") "PyObject *d;" write(fcode, "(4X, A)") "PyObject *v;" - write(fcode, "(4X, A)") "m = PyModule_Create(&codata);" + write(fcode, "(4X, A)") "m = PyModule_Create(&constants);" write(fcode, "(4X, A)") "d = PyModule_GetDict(m);" write(fcode, "(A)") "" end subroutine diff --git a/srcgen/codata_constants/main.f90 b/srcgen/codata_constants/main.f90 index 9a9afe7..1662c91 100644 --- a/srcgen/codata_constants/main.f90 +++ b/srcgen/codata_constants/main.f90 @@ -60,7 +60,7 @@ program generator open(file=fpath, newunit=fpython, status="new", action="write") ! CPYTHON - fpath = root//'pywrapper/pycodata/cpy_codata.c' + fpath = root//'pywrapper/pycodata/cpy_codata_constants.c' inquire(file=fpath, exist=exist) if(exist)then open(file=fpath, newunit=unit, status="old")