| 1068 | } |
| 1069 | |
| 1070 | static TSReturnCode |
| 1071 | URLPartSet(TSMBuffer bufp, TSMLoc obj, const char *value, int length, URLPartSetF url_f) |
| 1072 | { |
| 1073 | sdk_assert(sdk_sanity_check_mbuffer(bufp) == TS_SUCCESS); |
| 1074 | sdk_assert(sdk_sanity_check_url_handle(obj) == TS_SUCCESS); |
| 1075 | |
| 1076 | if (!isWriteable(bufp)) { |
| 1077 | return TS_ERROR; |
| 1078 | } |
| 1079 | |
| 1080 | URL u; |
| 1081 | u.m_heap = (reinterpret_cast<HdrHeapSDKHandle *>(bufp))->m_heap; |
| 1082 | u.m_url_impl = reinterpret_cast<URLImpl *>(obj); |
| 1083 | |
| 1084 | if (!value) { |
| 1085 | length = 0; |
| 1086 | } else if (length < 0) { |
| 1087 | length = strlen(value); |
| 1088 | } |
| 1089 | (u.*url_f)(value, length); |
| 1090 | |
| 1091 | return TS_SUCCESS; |
| 1092 | } |
| 1093 | |
| 1094 | const char * |
| 1095 | TSUrlRawSchemeGet(TSMBuffer bufp, TSMLoc obj, int *length) |
no test coverage detected