Skip to content

Commit a87a954

Browse files
committed
Temporarily remove custom lexbor code
1 parent aaa1d2c commit a87a954

File tree

2 files changed

+0
-91
lines changed

2 files changed

+0
-91
lines changed

ext/lexbor/lexbor/url/url.c

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -4529,93 +4529,6 @@ lxb_url_serialize(const lxb_url_t *url, lexbor_serialize_cb_f cb, void *ctx,
45294529
return LXB_STATUS_OK;
45304530
}
45314531

4532-
lxb_status_t
4533-
lxb_url_serialize_unicode(lxb_unicode_idna_t *idna, const lxb_url_t *url, lexbor_serialize_cb_f cb, void *ctx,
4534-
bool exclude_fragment)
4535-
{
4536-
lxb_status_t status;
4537-
const lexbor_str_t *str;
4538-
lxb_char_t *p;
4539-
lxb_char_t buf[LXB_URL_BUFFER_NUM_SIZE];
4540-
4541-
static const lexbor_str_t colon_str = lexbor_str(":");
4542-
static const lexbor_str_t dsol_str = lexbor_str("//");
4543-
static const lexbor_str_t at_str = lexbor_str("@");
4544-
static const lexbor_str_t dt_str = lexbor_str("/.");
4545-
static const lexbor_str_t qm_str = lexbor_str("?");
4546-
static const lexbor_str_t hs_str = lexbor_str("#");
4547-
4548-
/* Scheme. */
4549-
4550-
str = &url->scheme.name;
4551-
4552-
lexbor_serialize_write(cb, str->data, str->length, ctx, status);
4553-
lexbor_serialize_write(cb, colon_str.data, colon_str.length, ctx, status);
4554-
4555-
/* Host. */
4556-
4557-
if (url->host.type != LXB_URL_HOST_TYPE__UNDEF) {
4558-
lexbor_serialize_write(cb, dsol_str.data, dsol_str.length, ctx, status);
4559-
4560-
if (lxb_url_includes_credentials(url)) {
4561-
lexbor_serialize_write(cb, url->username.data, url->username.length,
4562-
ctx, status);
4563-
4564-
if (url->password.length != 0) {
4565-
lexbor_serialize_write(cb, colon_str.data, colon_str.length,
4566-
ctx, status);
4567-
lexbor_serialize_write(cb, url->password.data,
4568-
url->password.length, ctx, status);
4569-
}
4570-
4571-
lexbor_serialize_write(cb, at_str.data, at_str.length, ctx, status);
4572-
}
4573-
4574-
status = lxb_url_serialize_host_unicode(idna, &url->host, cb, ctx);
4575-
if (status != LXB_STATUS_OK) {
4576-
return status;
4577-
}
4578-
4579-
if (url->has_port) {
4580-
lexbor_serialize_write(cb, colon_str.data, colon_str.length,
4581-
ctx, status);
4582-
4583-
p = buf + lexbor_conv_int64_to_data((int64_t) url->port,
4584-
buf, LXB_URL_BUFFER_NUM_SIZE);
4585-
4586-
lexbor_serialize_write(cb, buf, p - buf, ctx, status);
4587-
}
4588-
}
4589-
else if (!url->path.opaque && url->path.str.length > 1) {
4590-
str = &url->path.str;
4591-
4592-
if (str->data[0] == '/' && str->data[1] == '/') {
4593-
lexbor_serialize_write(cb, dt_str.data, dt_str.length, ctx, status);
4594-
}
4595-
}
4596-
4597-
status = lxb_url_serialize_path(&url->path, cb, ctx);
4598-
if (status != LXB_STATUS_OK) {
4599-
return status;
4600-
}
4601-
4602-
if (url->query.data != NULL) {
4603-
lexbor_serialize_write(cb, qm_str.data, qm_str.length,
4604-
ctx, status);
4605-
lexbor_serialize_write(cb, url->query.data, url->query.length,
4606-
ctx, status);
4607-
}
4608-
4609-
if (!exclude_fragment && url->fragment.data != NULL) {
4610-
lexbor_serialize_write(cb, hs_str.data, hs_str.length,
4611-
ctx, status);
4612-
lexbor_serialize_write(cb, url->fragment.data, url->fragment.length,
4613-
ctx, status);
4614-
}
4615-
4616-
return LXB_STATUS_OK;
4617-
}
4618-
46194532
lxb_status_t
46204533
lxb_url_serialize_scheme(const lxb_url_t *url,
46214534
lexbor_serialize_cb_f cb, void *ctx)

ext/lexbor/lexbor/url/url.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -403,10 +403,6 @@ LXB_API lxb_status_t
403403
lxb_url_serialize(const lxb_url_t *url, lexbor_serialize_cb_f cb, void *ctx,
404404
bool exclude_fragment);
405405

406-
LXB_API lxb_status_t
407-
lxb_url_serialize_unicode(lxb_unicode_idna_t *idna, const lxb_url_t *url, lexbor_serialize_cb_f cb, void *ctx,
408-
bool exclude_fragment);
409-
410406
LXB_API lxb_status_t
411407
lxb_url_serialize_scheme(const lxb_url_t *url,
412408
lexbor_serialize_cb_f cb, void *ctx);

0 commit comments

Comments
 (0)