mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Add printf-style format attribute to oniguruma functions
Also make the format string compatible with literal strings which are const arrays of "plain" chars.
This commit is contained in:
parent
f8000e2931
commit
efa0c31ce5
Notes:
git
2021-09-27 19:03:06 +09:00
Merged: https://github.com/ruby/ruby/pull/4899 Merged-By: nobu <nobu@ruby-lang.org>
3 changed files with 13 additions and 5 deletions
|
@ -312,7 +312,7 @@ onig_error_code_to_str(UChar* s, OnigPosition code, ...)
|
|||
|
||||
void
|
||||
onig_vsnprintf_with_pattern(UChar buf[], int bufsize, OnigEncoding enc,
|
||||
UChar* pat, UChar* pat_end, const UChar *fmt, va_list args)
|
||||
UChar* pat, UChar* pat_end, const char *fmt, va_list args)
|
||||
{
|
||||
size_t need;
|
||||
int n, len;
|
||||
|
@ -376,7 +376,7 @@ onig_vsnprintf_with_pattern(UChar buf[], int bufsize, OnigEncoding enc,
|
|||
#if 0 /* unused */
|
||||
void
|
||||
onig_snprintf_with_pattern(UChar buf[], int bufsize, OnigEncoding enc,
|
||||
UChar* pat, UChar* pat_end, const UChar *fmt, ...)
|
||||
UChar* pat, UChar* pat_end, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue