| 1036 | } |
| 1037 | |
| 1038 | char * |
| 1039 | TSUrlStringGet(TSMBuffer bufp, TSMLoc obj, int *length) |
| 1040 | { |
| 1041 | // bufp is not actually used anymore, so it can be null. |
| 1042 | if (bufp) { |
| 1043 | sdk_assert(sdk_sanity_check_mbuffer(bufp) == TS_SUCCESS); |
| 1044 | } |
| 1045 | sdk_assert(sdk_sanity_check_url_handle(obj) == TS_SUCCESS); |
| 1046 | sdk_assert(sdk_sanity_check_null_ptr((void *)length) == TS_SUCCESS); |
| 1047 | |
| 1048 | URLImpl *url_impl = reinterpret_cast<URLImpl *>(obj); |
| 1049 | return url_string_get(url_impl, nullptr, length, nullptr); |
| 1050 | } |
| 1051 | |
| 1052 | using URLPartGetF = const char *(URL::*)(int *); |
| 1053 | using URLPartSetF = void (URL::*)(const char *, int); |