diff options
author | 2024-02-24 16:04:00 +0600 | |
---|---|---|
committer | 2024-02-24 16:04:00 +0600 | |
commit | 6277feb3be69788eac9e40a52c3a1c10f6d1311f (patch) | |
tree | 64afe50c819ea74b6b87c27afe4ac5fc4688d5e1 /src/teams.c | |
parent | 7455c3d0bda6ab60d3f67fafd0ce04428143bcbe (diff) | |
download | c-obp-example-6277feb3be69788eac9e40a52c3a1c10f6d1311f.tar.gz c-obp-example-6277feb3be69788eac9e40a52c3a1c10f6d1311f.zip |
Use CLASS construct to define class
Signed-off-by: Mubashshir <ahmubashshir@gmail.com>
Diffstat (limited to 'src/teams.c')
-rw-r--r-- | src/teams.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/teams.c b/src/teams.c index a3bf0a2..259c81c 100644 --- a/src/teams.c +++ b/src/teams.c @@ -6,16 +6,16 @@ #define __COBJ_PRIV_IMPLS_H__ #include "cobj.h" -typedef struct team_impl_struct { +CLASS(team, { char name[255]; char members[3][255]; char institution[255]; uint8_t solved; -} TEAM_impl; +}); // base functions NEW(team, { - return (ptr(TEAM_impl))malloc(sizeof(TEAM_impl)); + return (team)malloc(sizeof(TYPE(team))); }) DEL(team, { |