-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor / add const qualifer / expose struct to fix inline compile p…
…roblems
- Loading branch information
Showing
6 changed files
with
23 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#pragma once | ||
|
||
char *readFile(const char *const path); | ||
bool writeFile(const char *const path, char *data, size_t len); | ||
bool writeFile(const char *const path,const char *data, size_t len); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
#pragma once | ||
#include "cJSON.h" | ||
#include "basic_types.h" | ||
#include "hv/hplatform.h" // for bool | ||
|
||
#include "hv/hplatform.h" // for bool | ||
|
||
// dest must be pre-allocated | ||
bool getBoolFromJsonObject(bool *dest,const cJSON *json_obj, const char *key); | ||
bool getIntFromJsonObject(int *dest,const cJSON *json_obj, const char *key); | ||
bool getBoolFromJsonObject(bool *dest, const cJSON *json_obj, const char *key); | ||
bool getIntFromJsonObject(int *dest, const cJSON *json_obj, const char *key); | ||
// will allocate dest because it knows the string-len | ||
bool getStringFromJsonObject(char **dest,const cJSON *json_obj, const char *key); | ||
bool getStringFromJsonObjectOrDefault(char **dest,const cJSON *json_obj, const char *key, const char *def); | ||
|
||
|
||
bool getStringFromJsonObject(char **dest, const cJSON *json_obj, const char *key); | ||
bool getStringFromJsonObjectOrDefault(char **dest, const cJSON *json_obj, const char *key, const char *def); | ||
|
||
dynamic_value_t parseDynamicStrValueFromJsonObject(const cJSON *json_obj, char *key, size_t matchers, ...); | ||
dynamic_value_t parseDynamicNumericValueFromJsonObject(const cJSON *json_obj, char *key, size_t matchers, ...); | ||
dynamic_value_t parseDynamicStrValueFromJsonObject(const cJSON *json_obj, const char *key, size_t matchers, ...); | ||
dynamic_value_t parseDynamicNumericValueFromJsonObject(const cJSON *json_obj, const char *key, size_t matchers, ...); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters