mirror of
https://github.com/tezc/sc.git
synced 2025-01-14 06:43:04 +08:00
commit
8c8a3ede9f
@ -49,7 +49,7 @@ int main(int argc, char *argv[])
|
||||
sc_str_substring(&s1, 0, 5);
|
||||
printf("%s \n", s1); // prints hello
|
||||
|
||||
sc_str_destroy(s1);
|
||||
sc_str_destroy(&s1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ int main()
|
||||
sc_str_substring(&s1, 0, 5);
|
||||
printf("%s \n", s1); // prints hello
|
||||
|
||||
sc_str_destroy(s1);
|
||||
sc_str_destroy(&s1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ if (SC_BUILD_TEST)
|
||||
${CMAKE_CTEST_COMMAND} -C $<CONFIG> --verbose
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
# ----------------------- - Code Coverage Start ----------------------------- #
|
||||
# ----------------------- - Code Coverage Start ----------------------------- #
|
||||
|
||||
if (${CMAKE_BUILD_TYPE} MATCHES "Coverage")
|
||||
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
|
||||
@ -105,7 +105,7 @@ if (SC_BUILD_TEST)
|
||||
|
||||
add_dependencies(coverage_${PROJECT_NAME} check_${PROJECT_NAME})
|
||||
|
||||
# -------------------------- Code Coverage End ------------------------------ #
|
||||
# -------------------------- Code Coverage End ------------------------------ #
|
||||
endif ()
|
||||
# ----------------------- Test Configuration End ---------------------------- #
|
||||
|
||||
|
@ -29,7 +29,7 @@ int main(int argc, char *argv[])
|
||||
printf("%s \n", uri->query); // prints "name=jane"
|
||||
printf("%s \n", uri->fragment); // prints "doe"
|
||||
|
||||
sc_uri_destroy(uri);
|
||||
sc_uri_destroy(&uri);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -7,9 +7,7 @@ int main()
|
||||
struct sc_uri *uri;
|
||||
uri = sc_uri_create("http://user:pass@any.com:8042/over/"
|
||||
"there?name=jane#doe");
|
||||
printf("%s \n",
|
||||
uri->str); // prints
|
||||
// "http://user:pass@any.com:8042/over/there?name=jane#doe"
|
||||
printf("%s \n", uri->str); // prints "http://user:pass@any.com:8042/over/there?name=jane#doe"
|
||||
printf("%s \n", uri->scheme); // prints "http"
|
||||
printf("%s \n", uri->host); // prints "any.com"
|
||||
printf("%s \n", uri->userinfo); // prints "user:pass"
|
||||
@ -18,7 +16,7 @@ int main()
|
||||
printf("%s \n", uri->query); // prints "name=jane"
|
||||
printf("%s \n", uri->fragment); // prints "doe"
|
||||
|
||||
sc_uri_destroy(uri);
|
||||
sc_uri_destroy(&uri);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user