Fix function prototypes of generated pointer functions
Previously, the emitted constructors were incomplete prototypes. When compiling the wrapper code using gcc 6 and -Wstrict-prototypes, the following warnings were emitted: warning: function declaration isn’t a prototype [-Wstrict-prototypes] See #801
This commit is contained in:
parent
0cdbbf326b
commit
5691f3f685
2 changed files with 4 additions and 4 deletions
|
|
@ -120,7 +120,7 @@ static NAME * frompointer(TYPE *t) {
|
|||
|
||||
%define %pointer_functions(TYPE,NAME)
|
||||
%{
|
||||
static TYPE *new_##NAME() { %}
|
||||
static TYPE *new_##NAME(void) { %}
|
||||
#ifdef __cplusplus
|
||||
%{ return new TYPE(); %}
|
||||
#else
|
||||
|
|
@ -155,7 +155,7 @@ static TYPE NAME ##_value(TYPE *obj) {
|
|||
}
|
||||
%}
|
||||
|
||||
TYPE *new_##NAME();
|
||||
TYPE *new_##NAME(void);
|
||||
TYPE *copy_##NAME(TYPE value);
|
||||
void delete_##NAME(TYPE *obj);
|
||||
void NAME##_assign(TYPE *obj, TYPE value);
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ typedef struct {
|
|||
|
||||
%define %pointer_functions(TYPE,NAME)
|
||||
%{
|
||||
static TYPE *new_##NAME() {
|
||||
static TYPE *new_##NAME(void) {
|
||||
return %new_instance(TYPE);
|
||||
}
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ typedef struct {
|
|||
}
|
||||
%}
|
||||
|
||||
TYPE *new_##NAME();
|
||||
TYPE *new_##NAME(void);
|
||||
TYPE *copy_##NAME(TYPE value);
|
||||
void delete_##NAME(TYPE *obj);
|
||||
void NAME##_assign(TYPE *obj, TYPE value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue