Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types: add RE_ARG_SIZE struct pl (avoids wrong print fmt %r usage) #928

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

sreimers
Copy link
Member

@sreimers sreimers commented Aug 30, 2023

#include <re.h>

int main(void)
{
	struct pl r = {.p = "world",  str_len("world")};

	re_printf("hello %r\n", r); /* common mistake needs pointer "&r" */

	return 0;
}

print: Format: "hello %r<-- SIZE ERROR

@sreimers sreimers merged commit e4ae3dd into main Aug 31, 2023
38 checks passed
@sreimers sreimers deleted the re_va_arg_struct_pl branch August 31, 2023 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant