Skip to content

Commit e5f5b80

Browse files
committed
#124 fix warning
1 parent ae1b89f commit e5f5b80

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

flecs.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -26007,7 +26007,7 @@ int json_typeinfo_ser_type_ops(
2600726007
return -1;
2600826008
}
2600926009

26010-
int ecs_type_info_to_buf(
26010+
int ecs_type_info_to_json_buf(
2601126011
const ecs_world_t *world,
2601226012
ecs_entity_t type,
2601326013
ecs_strbuf_t *buf)
@@ -26041,7 +26041,7 @@ char* ecs_type_info_to_json(
2604126041
{
2604226042
ecs_strbuf_t str = ECS_STRBUF_INIT;
2604326043

26044-
if (ecs_type_info_to_buf(world, type, &str) != 0) {
26044+
if (ecs_type_info_to_json_buf(world, type, &str) != 0) {
2604526045
ecs_strbuf_reset(&str);
2604626046
return NULL;
2604726047
}

flecs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -7874,7 +7874,7 @@ char* ecs_type_info_to_json(
78747874
* @return Zero if success, non-zero if failed.
78757875
*/
78767876
FLECS_API
7877-
char* ecs_type_info_to_json_buf(
7877+
int ecs_type_info_to_json_buf(
78787878
const ecs_world_t *world,
78797879
ecs_entity_t type,
78807880
ecs_strbuf_t *buf_out);

include/flecs/addons/json.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ char* ecs_type_info_to_json(
137137
* @return Zero if success, non-zero if failed.
138138
*/
139139
FLECS_API
140-
char* ecs_type_info_to_json_buf(
140+
int ecs_type_info_to_json_buf(
141141
const ecs_world_t *world,
142142
ecs_entity_t type,
143143
ecs_strbuf_t *buf_out);

src/addons/json/serialize_type_info.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ int json_typeinfo_ser_type_ops(
162162
return -1;
163163
}
164164

165-
int ecs_type_info_to_buf(
165+
int ecs_type_info_to_json_buf(
166166
const ecs_world_t *world,
167167
ecs_entity_t type,
168168
ecs_strbuf_t *buf)
@@ -196,7 +196,7 @@ char* ecs_type_info_to_json(
196196
{
197197
ecs_strbuf_t str = ECS_STRBUF_INIT;
198198

199-
if (ecs_type_info_to_buf(world, type, &str) != 0) {
199+
if (ecs_type_info_to_json_buf(world, type, &str) != 0) {
200200
ecs_strbuf_reset(&str);
201201
return NULL;
202202
}

0 commit comments

Comments
 (0)