Skip to content

Commit f469c76

Browse files
committed
py: Rename __QSTR_EXTRACT flag to NO_QSTR.
It has more usages than just qstr extraction, for example, embedding (where people don't care about efficient predefined qstrs).
1 parent b5190f1 commit f469c76

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

py/mkrules.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ $(BUILD)/%.o: %.c
4949
# List all native flags since the current build system doesn't have
5050
# the micropython configuration available. However, these flags are
5151
# needed to extract all qstrings
52-
QSTR_GEN_EXTRA_CFLAGS += -D__QSTR_EXTRACT -DN_X64 -DN_X86 -DN_THUMB -DN_ARM
52+
QSTR_GEN_EXTRA_CFLAGS += -DNO_QSTR -DN_X64 -DN_X86 -DN_THUMB -DN_ARM
5353
QSTR_GEN_EXTRA_CFLAGS += -I$(BUILD)/tmp
5454

5555
vpath %.c . $(TOP)

py/qstr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const qstr_pool_t mp_qstr_const_pool = {
9393
10, // set so that the first dynamically allocated pool is twice this size; must be <= the len (just below)
9494
MP_QSTRnumber_of, // corresponds to number of strings in array just below
9595
{
96-
#ifndef __QSTR_EXTRACT
96+
#ifndef NO_QSTR
9797
#define QDEF(id, str) str,
9898
#include "genhdr/qstrdefs.generated.h"
9999
#undef QDEF

py/qstr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
// first entry in enum will be MP_QSTR_NULL=0, which indicates invalid/no qstr
3939
enum {
40-
#ifndef __QSTR_EXTRACT
40+
#ifndef NO_QSTR
4141
#define QDEF(id, str) id,
4242
#include "genhdr/qstrdefs.generated.h"
4343
#undef QDEF

windows/msvc/genhdr.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ using(var outFile = System.IO.File.CreateText(OutputFile)) {
4747
<Target Name="MakeQstrDefs" DependsOnTargets="MakeDestDir" Inputs="@(ClCompile)" Outputs="$(QstrDefsCollected)">
4848
<ItemGroup>
4949
<PyIncDirs Include="$(PyIncDirs)"/>
50-
<PreProcDefs Include="%(ClCompile.PreProcessorDefinitions);__QSTR_EXTRACT;N_X64;N_X86;N_THUMB;N_ARM"/>
50+
<PreProcDefs Include="%(ClCompile.PreProcessorDefinitions);NO_QSTR;N_X64;N_X86;N_THUMB;N_ARM"/>
5151
<PyQstrSourceFiles Include="@(ClCompile)">
5252
<OutFile>$([System.String]::new('%(FullPath)').Replace('$(PyBaseDir)', '$(DestDir)qstr\'))</OutFile>
5353
</PyQstrSourceFiles>

0 commit comments

Comments
 (0)