示例#1
0
CFCParcel*
CFCParcel_new_from_file(const char *path) {
    size_t len;
    char *json = CFCUtil_slurp_text(path, &len);
    CFCParcel *self = S_new_from_json(json, path);
    FREEMEM(json);
    return self;
}
示例#2
0
CFCParcel*
CFCParcel_new_from_file(CFCFileSpec *file_spec) {
    const char *path = CFCFileSpec_get_path(file_spec);
    size_t len;
    char *json = CFCUtil_slurp_text(path, &len);
    CFCParcel *self = S_new_from_json(json, file_spec);
    FREEMEM(json);
    return self;
}
示例#3
0
CFCParcel*
CFCParcel_new_from_json(const char *json) {
    return S_new_from_json(json, "[NULL]");
}
示例#4
0
CFCParcel*
CFCParcel_new_from_json(const char *json, CFCFileSpec *file_spec) {
    return S_new_from_json(json, file_spec);
}