Skip to content

Commit 01a3321

Browse files
committed
Move mimalloc headers into internal header directory
1 parent 60d6011 commit 01a3321

8 files changed

+18
-13
lines changed

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ Tools/ssl/win32
139139
Tools/freeze/test/outdir
140140

141141
# unused mimalloc files
142-
Include/mimalloc/mimalloc-new-delete.h
143-
Include/mimalloc/mimalloc-override.h
142+
Include/internal/mimalloc/mimalloc-new-delete.h
143+
Include/internal/mimalloc/mimalloc-override.h
144144

145145
# The frozen modules are always generated by the build so we don't
146146
# keep them in the repo. Also see Tools/scripts/freeze_modules.py.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Makefile.pre.in

+11-6
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,10 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
349349

350350
MIMALLOC_HEADERS = \
351351
$(srcdir)/Include/internal/pycore_mimalloc.h \
352-
$(srcdir)/Include/mimalloc/mimalloc-atomic.h \
353-
$(srcdir)/Include/mimalloc/mimalloc.h \
354-
$(srcdir)/Include/mimalloc/mimalloc-internal.h \
355-
$(srcdir)/Include/mimalloc/mimalloc-types.h \
352+
$(srcdir)/Include/internal/mimalloc/mimalloc-atomic.h \
353+
$(srcdir)/Include/internal/mimalloc/mimalloc.h \
354+
$(srcdir)/Include/internal/mimalloc/mimalloc-internal.h \
355+
$(srcdir)/Include/internal/mimalloc/mimalloc-types.h \
356356

357357
MIMALLOC_INCLUDES = \
358358
$(srcdir)/Objects/mimalloc/alloc-aligned.c \
@@ -1280,7 +1280,7 @@ Python/dynload_hpux.o: $(srcdir)/Python/dynload_hpux.c Makefile
12801280

12811281
Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile $(srcdir)/Include/pydtrace.h @MIMALLOC_INCLUDES@
12821282
$(CC) -c $(PY_CORE_CFLAGS) \
1283-
-I$(srcdir)/Include/mimalloc \
1283+
-I$(srcdir)/Include/internal/mimalloc \
12841284
-DABIFLAGS='"$(ABIFLAGS)"' \
12851285
$(MULTIARCH_CPPFLAGS) \
12861286
-o $@ $(srcdir)/Python/sysmodule.c
@@ -2144,6 +2144,11 @@ inclinstall:
21442144
echo $(INSTALL_DATA) $$i $(INCLUDEPY)/internal; \
21452145
$(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY)/internal; \
21462146
done
2147+
@for i in $(srcdir)/Include/internal/mimalloc/*.h; \
2148+
do \
2149+
echo $(INSTALL_DATA) $$i $(INCLUDEPY)/internal/mimalloc; \
2150+
$(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY)/internal/mimalloc; \
2151+
done
21472152
$(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
21482153

21492154
# Install the library and miscellaneous stuff needed for extending/embedding
@@ -2313,7 +2318,7 @@ Python/dtoa.o: Python/dtoa.c
23132318

23142319
# obmalloc includes mimalloc
23152320
Objects/obmalloc.o: Objects/obmalloc.c @MIMALLOC_INCLUDES@
2316-
$(CC) -c $(PY_CORE_CFLAGS) -I$(srcdir)/Include/mimalloc -o $@ $<
2321+
$(CC) -c $(PY_CORE_CFLAGS) -I$(srcdir)/Include/internal/mimalloc -o $@ $<
23172322

23182323
# Run reindent on the library
23192324
reindent:

PCbuild/pyproject.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</PropertyGroup>
3030
<ItemDefinitionGroup>
3131
<ClCompile>
32-
<AdditionalIncludeDirectories>$(PySourcePath)Include;$(PySourcePath)Include\internal;$(PySourcePath)Include\mimalloc;$(PySourcePath)PC;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
32+
<AdditionalIncludeDirectories>$(PySourcePath)Include;$(PySourcePath)Include\internal;$(PySourcePath)Include\internal\mimalloc;$(PySourcePath)PC;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
3333
<PreprocessorDefinitions>WIN32;$(_Py3NamePreprocessorDefinition);$(_PlatformPreprocessorDefinition)$(_DebugPreprocessorDefinition)$(_PydPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
3434

3535
<Optimization>MaxSpeed</Optimization>

PCbuild/pythoncore.vcxproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,6 @@
156156
<ClInclude Include="..\Include\cpython\longintrepr.h" />
157157
<ClInclude Include="..\Include\cpython\longobject.h" />
158158
<ClInclude Include="..\Include\cpython\methodobject.h" />
159-
<ClInclude Include="..\Include\mimalloc\mimalloc-atomic.h" />
160-
<ClInclude Include="..\Include\mimalloc\mimalloc.h" />
161-
<ClInclude Include="..\Include\mimalloc\mimalloc-internal.h" />
162-
<ClInclude Include="..\Include\mimalloc\mimalloc-types.h" />
163159
<ClInclude Include="..\Include\cpython\object.h" />
164160
<ClInclude Include="..\Include\cpython\objimpl.h" />
165161
<ClInclude Include="..\Include\cpython\odictobject.h" />
@@ -192,6 +188,10 @@
192188
<ClInclude Include="..\Include\floatobject.h" />
193189
<ClInclude Include="..\Include\frameobject.h" />
194190
<ClInclude Include="..\Include\import.h" />
191+
<ClInclude Include="..\Include\internal\mimalloc\mimalloc-atomic.h" />
192+
<ClInclude Include="..\Include\internal\mimalloc\mimalloc.h" />
193+
<ClInclude Include="..\Include\internal\mimalloc\mimalloc-internal.h" />
194+
<ClInclude Include="..\Include\internal\mimalloc\mimalloc-types.h" />
195195
<ClInclude Include="..\Include\internal\pycore_abstract.h" />
196196
<ClInclude Include="..\Include\internal\pycore_accu.h" />
197197
<ClInclude Include="..\Include\internal\pycore_asdl.h" />

0 commit comments

Comments
 (0)