glsl/pp: Avoid using `__VERSION__' as an identifier.
This commit is contained in:
parent
7a95a3c7c4
commit
69fec23251
|
@ -56,7 +56,7 @@ sl_pp_dict_init(struct sl_pp_context *context)
|
||||||
|
|
||||||
ADD_NAME_STR(context, ___LINE__, "__LINE__");
|
ADD_NAME_STR(context, ___LINE__, "__LINE__");
|
||||||
ADD_NAME_STR(context, ___FILE__, "__FILE__");
|
ADD_NAME_STR(context, ___FILE__, "__FILE__");
|
||||||
ADD_NAME(context, __VERSION__);
|
ADD_NAME_STR(context, ___VERSION__, "__VERSION__");
|
||||||
|
|
||||||
ADD_NAME(context, optimize);
|
ADD_NAME(context, optimize);
|
||||||
ADD_NAME(context, debug);
|
ADD_NAME(context, debug);
|
||||||
|
|
|
@ -28,6 +28,9 @@
|
||||||
#ifndef SL_PP_DICT_H
|
#ifndef SL_PP_DICT_H
|
||||||
#define SL_PP_DICT_H
|
#define SL_PP_DICT_H
|
||||||
|
|
||||||
|
|
||||||
|
struct sl_pp_context;
|
||||||
|
|
||||||
struct sl_pp_dict {
|
struct sl_pp_dict {
|
||||||
int all;
|
int all;
|
||||||
int _GL_ARB_draw_buffers;
|
int _GL_ARB_draw_buffers;
|
||||||
|
@ -42,7 +45,7 @@ struct sl_pp_dict {
|
||||||
|
|
||||||
int ___LINE__;
|
int ___LINE__;
|
||||||
int ___FILE__;
|
int ___FILE__;
|
||||||
int __VERSION__;
|
int ___VERSION__;
|
||||||
|
|
||||||
int optimize;
|
int optimize;
|
||||||
int debug;
|
int debug;
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include "sl_pp_macro.h"
|
#include "sl_pp_macro.h"
|
||||||
#include "sl_pp_process.h"
|
#include "sl_pp_process.h"
|
||||||
|
|
||||||
|
@ -149,7 +150,7 @@ sl_pp_macro_expand(struct sl_pp_context *context,
|
||||||
(*pi)++;
|
(*pi)++;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (macro_name == context->dict.__VERSION__) {
|
if (macro_name == context->dict.___VERSION__) {
|
||||||
if (!mute && _out_number(context, state, 110)) {
|
if (!mute && _out_number(context, state, 110)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue