New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change import format to yaml #83
Conversation
@@ -36,6 +37,7 @@ int yaml_iterate_sequence(yaml_node *node, sequence_functor functor, void *userd | |||
|
|||
int process_32bit_integer(yaml_node *node, uint32_t *nid); | |||
int process_boolean(yaml_node *node, uint32_t *boolean); | |||
int process_bool(yaml_node *node, bool *boolean); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cannot use process_boolean
? that look same (least same in c)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got a warning between uint32_t and bool
seems like we're leaking memory in every strdup |
} | ||
|
||
char* booltostr(char *buf, int x){ | ||
if(x){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return x ? "true" : "false"
{ | ||
json_t *json_symbols = json_object(); | ||
char* hextostr(char *buf, int x){ | ||
sprintf(buf,"0x%x",x); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remove buf
argument completely here and below and make it
static char buf[20];
sprintf(buf, "0x%x", x);
return buf;
WIP