Merge pull request #139 from iysheng/master

1. Fix compile error with incompatible types and function argument mismatch in README
pull/148/head
朱天龙 (Armink) 3 years ago committed by GitHub
commit 91eb583605
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -142,7 +142,7 @@ ef_set_struct("
/* 获取结构体类型环境变量 */ /* 获取结构体类型环境变量 */
Student *student; Student *student;
ef_get_struct("张三学生", student, stu_get_cb); student = ef_get_struct("张三学生", stu_get_cb);
/* 打印获取到的结构体内容 */ /* 打印获取到的结构体内容 */
printf("姓名:%s 籍贯:%s \n", student->name, student->hometown.name); printf("姓名:%s 籍贯:%s \n", student->name, student->hometown.name);

@ -82,7 +82,7 @@ long ef_get_long(const char *key) {
return atol(value); return atol(value);
} else { } else {
EF_INFO("Couldn't find this ENV(%s)!\n", key); EF_INFO("Couldn't find this ENV(%s)!\n", key);
return NULL; return 0;
} }
} }
@ -96,7 +96,7 @@ double ef_get_double(const char *key) {
return atof(value); return atof(value);
} else { } else {
EF_INFO("Couldn't find this ENV(%s)!\n", key); EF_INFO("Couldn't find this ENV(%s)!\n", key);
return NULL; return 0;
} }
} }

Loading…
Cancel
Save