mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader: Use yy_scan_bytes() instead of yy_scan_string().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
b35fd8628e
commit
001328e084
@@ -282,13 +282,13 @@ static void update_location(struct hlsl_ctx *ctx, YYLTYPE *lloc)
|
||||
ctx->location.column += yyget_leng(ctx->scanner);
|
||||
}
|
||||
|
||||
int hlsl_lexer_compile(struct hlsl_ctx *ctx, const char *text)
|
||||
int hlsl_lexer_compile(struct hlsl_ctx *ctx, const struct vkd3d_shader_code *hlsl)
|
||||
{
|
||||
YY_BUFFER_STATE buffer;
|
||||
int ret;
|
||||
|
||||
yylex_init_extra(ctx, &ctx->scanner);
|
||||
buffer = yy_scan_string(text, ctx->scanner);
|
||||
buffer = yy_scan_bytes(hlsl->code, hlsl->size, ctx->scanner);
|
||||
yy_switch_to_buffer(buffer, ctx->scanner);
|
||||
|
||||
ret = hlsl_yyparse(ctx->scanner, ctx);
|
||||
|
||||
Reference in New Issue
Block a user