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

Skip to content

Commit 4a79e36

Browse files
author
Andrew MacIntyre
committed
make _sre a dynamically loadable module and build xxsubtype
1 parent 388fbf3 commit 4a79e36

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

PC/os2emx/Makefile

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,7 @@ SRC.MODULES= $(addprefix $(TOP), \
252252
Modules/gcmodule.c \
253253
Modules/signalmodule.c \
254254
Modules/posixmodule.c \
255-
Modules/threadmodule.c \
256-
Modules/_sre.c)
255+
Modules/threadmodule.c)
257256
SRC.PARSER= $(addprefix $(TOP), \
258257
Parser/acceler.c \
259258
Parser/grammar1.c \
@@ -382,11 +381,13 @@ HARDEXTMODULES= binascii \
382381
pcre \
383382
regex \
384383
_socket \
384+
_sre \
385385
termios \
386386
_testcap \
387387
unicoded \
388388
_weakref \
389-
xreadlin
389+
xreadlin \
390+
xxsubtyp
390391

391392
# Python external ($(MODULE.EXT)) modules - can be EASY or HARD
392393
ifeq ($(ZLIB),yes)
@@ -513,6 +514,9 @@ regex$(MODULE.EXT): $(OUT)regexmodule$O $(OUT)regexpr$O $(OUT)regex_m.def $(PYTH
513514
_socket$(MODULE.EXT): $(OUT)socketmodule$O $(OUT)_socket_m.def $(PYTHON.IMPLIB)
514515
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
515516

517+
_sre$(MODULE.EXT): $(OUT)_sre$O $(OUT)_sre_m.def $(PYTHON.IMPLIB)
518+
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
519+
516520
# _symtable needs to be renamed to be useful
517521
_symtable$(MODULE.EXT): $(OUT)symtablemodule$O $(OUT)_symtable_m.def $(PYTHON.IMPLIB)
518522
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
@@ -547,6 +551,13 @@ xreadlines$(MODULE.EXT): $(OUT)xreadlinesmodule$O $(OUT)xreadlines_m.def $(PYTHO
547551
xreadlin$(MODULE.EXT): xreadlines$(MODULE.EXT)
548552
cp $^ $@
549553

554+
# xxsubtype needs to be renamed to be useful
555+
xxsubtype$(MODULE.EXT): $(OUT)xxsubtype$O $(OUT)xxsubtype_m.def $(PYTHON.IMPLIB)
556+
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
557+
558+
xxsubtyp$(MODULE.EXT): xxsubtype$(MODULE.EXT)
559+
cp $^ $@
560+
550561
# - optional modules (requiring other software to be installed)
551562
bsddb$(MODULE.EXT): $(OUT)bsddbmodule$O $(OUT)bsddb_m.def $(PYTHON.IMPLIB)
552563
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) -ldb $(LIBS)

PC/os2emx/config.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ extern void inittime();
8080
extern void inittiming();
8181
extern void initunicodedata();
8282
extern void initxreadlines();
83+
extern void initxxsubtype();
8384
extern void initzlib();
8485

8586
/* -- ADDMODULE MARKER 1 -- */
@@ -91,7 +92,6 @@ struct _inittab _PyImport_Inittab[] = {
9192

9293
{"gc", initgc},
9394
{"os2", initos2},
94-
{"_sre", init_sre},
9595
{"signal", initsignal},
9696
#ifdef WITH_THREAD
9797
{"thread", initthread},
@@ -102,6 +102,7 @@ struct _inittab _PyImport_Inittab[] = {
102102
{"_curses_panel", init_curses_panel},
103103
{"_hotshot", init_hotshot},
104104
{"_locale", init_locale},
105+
{"_sre", init_sre},
105106
{"_testcapi", init_testcapi},
106107
{"_weakref", init_weakref},
107108
{"array", initarray},
@@ -134,6 +135,7 @@ struct _inittab _PyImport_Inittab[] = {
134135
{"timing", inittiming},
135136
{"unicodedata", initunicodedata},
136137
{"xreadlines", initxreadlines},
138+
{"xxsubtype", initxxsubtype},
137139
{"zlib", initzlib},
138140
#ifdef USE_SOCKET
139141
{"_socket", init_socket},

0 commit comments

Comments
 (0)