Main: CONTRIBUTING.md: improve

This commit is contained in:
Alex Kotov 2022-06-15 13:14:37 +03:00
parent 8503637778
commit a75c952b10
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 10 additions and 4 deletions

View File

@ -18,11 +18,17 @@ C language
typedef struct FooBar { int car; } *FooBar;
static struct FooBar FooBar_create();
static void FooBar FooBar_init(FooBar foobar);
static void FooBar_do_something(FooBar foobar);
// ...
// Initialize:
struct FooBar foobar = FooBar_create();
// or
struct FooBar foobar;
FooBar_init(&foobar);
// Use:
FooBar foobar_ptr = &foobar;
FooBar_do_something(&foobar);
```
@ -35,13 +41,13 @@ static void FooBar FooBar_init(FooBar foobar);
static void FooBar_do_something(FooBar foobar);
// ...
// Initialize:
FooBar foobar = { FooBar_create() };
// or
FooBar foobar;
FooBar_init(foobar);
// Use:
FooBar_do_something(foobar);
```