Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6d7c442

Browse files
committed
Try to supply a prototype for the module init function but avoid
Windows "inconsistent linkage" warnings at the same time. I agree with Mark Hammond that the whole DL_IMPORT/DL_EXPORT macro system needs an overhaul; this is just an expedient hack until then.
1 parent 018cbb1 commit 6d7c442

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/parsermodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2846,7 +2846,7 @@ static PyMethodDef parser_functions[] = {
28462846
};
28472847

28482848

2849-
DL_IMPORT(void) initparser(void);
2849+
DL_EXPORT(void) initparser(void); /* supply a prototype */
28502850

28512851
DL_EXPORT(void)
28522852
initparser(void)

Modules/pyexpat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ static char pyexpat_module_documentation[] =
854854

855855
/* Initialization function for the module */
856856

857-
DL_IMPORT(void) initpyexpat(void);
857+
DL_EXPORT(void) initpyexpat(void); /* supply a prototype */
858858

859859
DL_EXPORT(void)
860860
initpyexpat(void)

0 commit comments

Comments
 (0)