Skip to content
Snippets Groups Projects
Commit cc0eeb5e authored by Per Hedbor's avatar Per Hedbor
Browse files

Fixed linenumbers when using callback-based macros

parent 84c13341
No related branches found
No related tags found
No related merge requests found
...@@ -2268,6 +2268,9 @@ static void insert_callback_define(struct cpp *this, ...@@ -2268,6 +2268,9 @@ static void insert_callback_define(struct cpp *this,
this->handler, this->compat_handler, 2, 0 ) && this->handler, this->compat_handler, 2, 0 ) &&
TYPEOF(sp[-1]) == T_STRING ) { TYPEOF(sp[-1]) == T_STRING ) {
string_builder_shared_strcat(tmp, sp[-1].u.string); string_builder_shared_strcat(tmp, sp[-1].u.string);
string_builder_sprintf(tmp, "\n#line %ld ", (long)this->current_line);
insert_current_file_as_string( this,def,args,tmp);
string_builder_putchar(tmp, '\n');
pop_stack(); pop_stack();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment