File tree 4 files changed +9
-9
lines changed
cmake-init/templates/c/executable
4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 9
9
10
10
static const char json [] = "{\"name\":\"{= name =}\"}" ;{% end %}
11
11
12
- library create_library ()
12
+ struct library create_library ()
13
13
{
14
- library lib ;{% if pm %}
14
+ struct library lib ;{% if pm %}
15
15
struct json_tokener * tokener = NULL ;
16
16
struct json_object * object = NULL ;
17
17
struct json_object * name_object = NULL ;
@@ -58,7 +58,7 @@ library create_library()
58
58
return lib ;
59
59
}{% if pm %}
60
60
61
- void destroy_library (library * lib )
61
+ void destroy_library (struct library * lib )
62
62
{
63
63
free (HEDLEY_CONST_CAST (void * , lib -> name ));
64
64
}{% end %}
Original file line number Diff line number Diff line change 3
3
/**
4
4
* @brief Simply initializes the name member to the name of the project
5
5
*/
6
- typedef struct library {
6
+ struct library {
7
7
const char * name ;
8
- } library ;
8
+ };
9
9
10
10
/**
11
11
* @brief Creates an instance of library with the name of the project
12
12
*/
13
- library create_library (void );{% if pm %}
13
+ struct library create_library (void );{% if pm %}
14
14
15
15
/**
16
16
* @brief Destroys resources held by the library
17
17
*/
18
- void destroy_library (library * lib );{% end %}
18
+ void destroy_library (struct library * lib );{% end %}
Original file line number Diff line number Diff line change 5
5
6
6
int main (int argc , const char * argv [])
7
7
{
8
- library lib = create_library ();
8
+ struct library lib = create_library ();
9
9
10
10
(void )argc ;
11
11
(void )argv ;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ TEST_CASE("Name is {= name =}", "[library]")
17
17
}{ % else %}
18
18
int main (int argc , const char * argv [])
19
19
{
20
- library lib = create_library ();
20
+ struct library lib = create_library ();
21
21
22
22
(void )argc ;
23
23
(void )argv ;
You can’t perform that action at this time.
0 commit comments