Skip to content
This repository was archived by the owner on Jun 6, 2021. It is now read-only.

Commit

Permalink
Prefer a pointer to an incomplete type to void *.
Browse files Browse the repository at this point in the history
  • Loading branch information
jillest committed Aug 28, 2011
1 parent bc62eec commit 03cd1dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/entity-validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
#ifndef ENTITY_VALIDATION_H
#define ENTITY_VALIDATION_H

typedef struct {
struct entity_chanacs_validation_vtable {
chanacs_t *(*match_entity)(chanacs_t *ca, myentity_t *mt);
chanacs_t *(*match_user)(chanacs_t *ca, user_t *mt);

bool (*can_register_channel)(myentity_t *mt);
} entity_chanacs_validation_vtable_t;
};

E entity_chanacs_validation_vtable_t *myentity_get_chanacs_validator(myentity_t *mt);

Expand Down
4 changes: 3 additions & 1 deletion include/entity.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ typedef enum {
ENT_EXTTARGET,
} myentity_type_t;

typedef struct entity_chanacs_validation_vtable entity_chanacs_validation_vtable_t;

typedef struct {
object_t parent;
myentity_type_t type;
char *name;
char id[IDLEN];

mowgli_list_t chanacs;
void *chanacs_validate; /* vtable for validating chanacs entries */
entity_chanacs_validation_vtable_t *chanacs_validate;
} myentity_t;

#define entity(x) ((myentity_t *)(x))
Expand Down

0 comments on commit 03cd1dc

Please sign in to comment.