Skip to content

Commit 9a3567b

Browse files
committed
Ditched the #version auto syntax again.
For compatibility reasons, `#version auto` is no reasonable alternative to `#version version`, so it has been removed and the use of `version` inside a `#version` statement un-deprecated again.
1 parent e1e7b0d commit 9a3567b

File tree

6 files changed

+8
-19
lines changed

6 files changed

+8
-19
lines changed

source/base/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
#define OFFICIAL_VERSION_STRING "3.7.1"
4646
#define OFFICIAL_VERSION_NUMBER 371
4747

48-
#define POV_RAY_PRERELEASE "alpha.8449793"
48+
#define POV_RAY_PRERELEASE "alpha.8451792"
4949

5050
#if (POV_RAY_IS_AUTOBUILD == 1) && ((POV_RAY_IS_OFFICIAL == 1) || (POV_RAY_IS_SEMI_OFFICIAL == 1))
5151
#ifdef POV_RAY_PRERELEASE

source/parser/parser_expressions.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,18 +1036,15 @@ void Parser::Parse_Num_Factor (EXPRESS& Express,int *Terms)
10361036
if (!parsingVersionDirective)
10371037
{
10381038
// Normally, the `version` pseudo-variable needs to return the effective language version
1039-
// (which is now fixed to 3.6.2 if not specified otherwise) so that include files can properly
1040-
// switch back after temporarily overriding the `#version` setting.
1039+
// (which now defaults to 3.6.2) so that include files can properly switch back after
1040+
// temporarily overriding the `#version` setting.
10411041
Val = sceneData->EffectiveLanguageVersion() / 100.0;
10421042
}
10431043
else
10441044
{
1045-
// When used inside a `#version` statement, special handling is needed to support the (now
1046-
// deprecated) `#version version` idiom used in some 3.7.0 scenes to set the effective language
1047-
// version to whatever version of POV-Ray is actually used.
1048-
Warning("Use of the 'version' pseudo-variable in a '#version' directive is deprecated; "
1049-
"to specify that your scene is compatible with POV-Ray 3.7.1 or later but provides its "
1050-
"own mechanism of managing version compatibility, use '#version auto' instead.");
1045+
// When used inside a `#version` statement, special handling is needed to support the
1046+
// `#version version` idiom to set the effective language version to whatever version
1047+
// of POV-Ray is actually used.
10511048
Val = sceneData->languageVersion / 100.0;
10521049
}
10531050
break;

source/parser/parser_tokenizer.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,7 +1686,6 @@ void Parser::Parse_Directive(int After_Hash)
16861686
Macro *PMac=NULL;
16871687
COND_TYPE Curr_Type = Cond_Stack[CS_Index].Cond_Type;
16881688
POV_LONG Hash_Loc = Input_File->In_File->tellg().offset;
1689-
bool expectVersionNumber;
16901689

16911690
if (Curr_Type == INVOKING_MACRO_COND)
16921691
{
@@ -2212,11 +2211,7 @@ void Parser::Parse_Directive(int After_Hash)
22122211
Ok_To_Declare = false;
22132212
bool wasParsingVersionDirective = parsingVersionDirective;
22142213
parsingVersionDirective = true;
2215-
expectVersionNumber = true;
22162214
EXPECT_ONE
2217-
CASE (AUTO_TOKEN)
2218-
expectVersionNumber = false;
2219-
END_CASE
22202215
CASE (UNOFFICIAL_TOKEN)
22212216
#if POV_RAY_IS_OFFICIAL == 1
22222217
Get_Token();
@@ -2231,8 +2226,7 @@ void Parser::Parse_Directive(int After_Hash)
22312226
END_CASE
22322227
END_EXPECT
22332228

2234-
if (expectVersionNumber)
2235-
sceneData->languageVersion = (int)(Parse_Float() * 100 + 0.5);
2229+
sceneData->languageVersion = (int)(Parse_Float() * 100 + 0.5);
22362230

22372231
if ((sceneData->languageVersionLate) && sceneData->languageVersion >= 370)
22382232
{

source/parser/reservedwords.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ const RESERVED_WORD Reserved_Words[LAST_TOKEN] = {
9090
{ATAN_TOKEN, "atan"},
9191
{AT_TOKEN, "@"},
9292
{AUTOSTOP_TOKEN, "autostop"},
93-
{AUTO_TOKEN, "auto"},
9493
{AVERAGE_TOKEN, "average"},
9594
{BACKGROUND_TOKEN, "background"},
9695
{BACK_QUOTE_TOKEN, "`"},

source/parser/reservedwords.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ enum TOKEN_IDS
167167
ANISOTROPY_TOKEN,
168168
AREA_LIGHT_TOKEN,
169169
AT_TOKEN,
170-
AUTO_TOKEN,
171170
BACK_QUOTE_TOKEN,
172171
BACK_SLASH_TOKEN,
173172
BAR_TOKEN,

unix/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.7.1-alpha.8449793
1+
3.7.1-alpha.8451792

0 commit comments

Comments
 (0)