File tree Expand file tree Collapse file tree 3 files changed +4
-25
lines changed
Expand file tree Collapse file tree 3 files changed +4
-25
lines changed Original file line number Diff line number Diff line change 1- Copyright (c) 2012-2016 Georgi Valkov. All rights reserved.
1+ Copyright (c) 2012-2023 Georgi Valkov. All rights reserved.
22
33Redistribution and use in source and binary forms, with or without
44modification, are permitted provided that the following conditions are
Original file line number Diff line number Diff line change 4747 { NULL, NULL, 0, NULL}
4848};
4949
50- #if PY_MAJOR_VERSION >= 3
5150static struct PyModuleDef moduledef = {
5251 PyModuleDef_HEAD_INIT,
5352 MODULE_NAME,
5958 NULL, /* m_clear */
6059 NULL, /* m_free */
6160};
62- #endif
6361
64- static PyObject *
65- moduleinit (void)
62+ PyMODINIT_FUNC
63+ PyInit__ecodes (void)
6664{
67-
68- #if PY_MAJOR_VERSION >= 3
6965 PyObject* m = PyModule_Create(&moduledef);
70- #else
71- PyObject* m = Py_InitModule3(MODULE_NAME, MethodTable, MODULE_HELP);
72- #endif
73-
7466 if (m == NULL) return NULL;
7567
7668%s
7769
7870 return m;
7971}
80-
81- #if PY_MAJOR_VERSION >= 3
82- PyMODINIT_FUNC
83- PyInit__ecodes(void)
84- {
85- return moduleinit();
86- }
87- #else
88- PyMODINIT_FUNC
89- init_ecodes(void)
90- {
91- moduleinit();
92- }
93- #endif
9472'''
9573
9674def parse_header (header ):
Original file line number Diff line number Diff line change 2424 'Programming Language :: Python :: 3.8' ,
2525 'Programming Language :: Python :: 3.9' ,
2626 'Programming Language :: Python :: 3.10' ,
27+ 'Programming Language :: Python :: 3.11' ,
2728 'Operating System :: POSIX :: Linux' ,
2829 'Intended Audience :: Developers' ,
2930 'Topic :: Software Development :: Libraries' ,
You can’t perform that action at this time.
0 commit comments