Skip to content

Commit

Permalink
capi: add missing void
Browse files Browse the repository at this point in the history
Apparently in C, an empty parameter list means "the function takes an
unspecified number of arguments." (lol.) But an explicit void means
"the function takes zero arguments." The latter is indeed what we want
here.

Ref: https://softwareengineering.stackexchange.com/questions/286490/what-is-the-difference-between-function-and-functionvoid

Closes #942
  • Loading branch information
thechampagne authored and BurntSushi committed Mar 4, 2023
1 parent a9b2e02 commit 0fbc5f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions regex-capi/include/rure.h
Expand Up @@ -408,7 +408,7 @@ size_t rure_captures_len(rure_captures *captures);
* safe to call rure_compile from multiple threads simultaneously using the
* same options pointer.
*/
rure_options *rure_options_new();
rure_options *rure_options_new(void);

/*
* rure_options_free frees the given options.
Expand Down Expand Up @@ -536,7 +536,7 @@ size_t rure_set_len(rure_set *re);
* It is not safe to use errors from multiple threads simultaneously. An error
* value may be reused on subsequent calls to rure_compile.
*/
rure_error *rure_error_new();
rure_error *rure_error_new(void);

/*
* rure_error_free frees the error given.
Expand Down

0 comments on commit 0fbc5f6

Please sign in to comment.