u3: removes u3rz_sing in favor of the pre-existing u3r_sing_c

This commit is contained in:
Joe Bryan 2019-09-10 16:16:21 -07:00
parent 442fdc3fe7
commit 443f593d95
5 changed files with 12 additions and 31 deletions

View File

@ -141,11 +141,6 @@
c3_o
u3r_sing(u3_noun a, u3_noun b);
/* u3rz_sing(): transferring u3r_sing
*/
c3_o
u3rz_sing(u3_noun a, u3_noun b);
/* u3r_sung(): yes iff (a) and (b) are the same noun, unifying equals.
**
** Make sure you have no live, uncounted pointers to any noun
@ -154,9 +149,7 @@
c3_o
u3r_sung(u3_noun a, u3_noun b);
/* u3r_sing_c):
**
** Yes iff (b) is the same noun as the C string [a].
/* u3r_sing_c(): cord/C-string value equivalence.
*/
c3_o
u3r_sing_c(const c3_c* a_c,

View File

@ -645,16 +645,6 @@ u3r_sing(u3_noun a, u3_noun b)
}
}
/* u3rz_sing(): transferring u3r_sing
*/
c3_o
u3rz_sing(u3_noun a, u3_noun b)
{
c3_o ret_o = u3r_sing(a, b);
u3z(a); u3z(b);
return ret_o;
}
/* u3r_sung(): yes iff (a) and (b) are the same noun, unifying equals.
*/
c3_o
@ -841,13 +831,11 @@ u3r_nord(u3_noun a,
}
}
/* u3r_sing_c():
**
** Yes iff (b) is the same noun as the C string a_c.
/* u3r_sing_c(): cord/C-string value equivalence.
*/
c3_o
u3r_sing_c(const c3_c* a_c,
u3_noun b)
u3_noun b)
{
c3_assert(u3_none != b);

View File

@ -970,7 +970,7 @@ u3_cttp_ef_http_client(u3_noun fav)
{
u3_creq* ceq_u;
if ( c3y == u3rz_sing(u3i_string("request"), u3k(u3h(fav))) ) {
if ( c3y == u3r_sing_c("request", u3h(fav)) ) {
u3_noun p_fav, q_fav;
u3x_cell(u3t(fav), &p_fav, &q_fav);
@ -983,7 +983,7 @@ u3_cttp_ef_http_client(u3_noun fav)
u3l_log("cttp: strange request (unparsable url)\n");
}
}
else if ( c3y == u3rz_sing(u3i_string("cancel-request"), u3k(u3h(fav))) ) {
else if ( c3y == u3r_sing_c("cancel-request", u3h(fav)) ) {
ceq_u =_cttp_creq_find(u3r_word(0, u3t(fav)));
if ( ceq_u ) {

View File

@ -1505,16 +1505,16 @@ u3_http_ef_http_server(c3_l sev_l,
// sets server configuration
//
if ( c3y == u3rz_sing(u3i_string("set-config"), u3k(tag)) ) {
if ( c3y == u3r_sing_c("set-config", tag) ) {
u3_http_ef_form(u3k(dat));
}
// responds to an open request
//
else if ( 0 != (req_u = _http_search_req(sev_l, coq_l, seq_l)) ) {
if ( c3y == u3rz_sing(u3i_string("response"), u3k(tag)) ) {
if ( c3y == u3r_sing_c("response", tag) ) {
u3_noun response = dat;
if ( c3y == u3rz_sing(u3i_string("start"), u3k(u3h(response))) ) {
if ( c3y == u3r_sing_c("start", u3h(response)) ) {
// Separate the %start message into its components.
//
u3_noun response_header, data, complete;
@ -1525,7 +1525,7 @@ u3_http_ef_http_server(c3_l sev_l,
_http_start_respond(req_u, u3k(status), u3k(headers), u3k(data),
u3k(complete));
}
else if ( c3y == u3rz_sing(u3i_string("continue"), u3k(u3h(response))) ) {
else if ( c3y == u3r_sing_c("continue", u3h(response)) ) {
// Separate the %continue message into its components.
//
u3_noun data, complete;
@ -1533,7 +1533,7 @@ u3_http_ef_http_server(c3_l sev_l,
_http_continue_respond(req_u, u3k(data), u3k(complete));
}
else if (c3y == u3rz_sing(u3i_string("cancel"), u3k(u3h(response)))) {
else if (c3y == u3r_sing_c("cancel", u3h(response))) {
u3l_log("http: %%cancel not handled yet\n");
}
else {

View File

@ -280,7 +280,7 @@ _reck_kick_spec(u3_pier* pir_u, u3_noun pox, u3_noun fav)
if ( (c3n == u3r_cell(t_pox, &it_pox, &tt_pox)) ) {
u3z(pox); u3z(fav); return c3n;
}
else if ( c3y == u3rz_sing(u3i_string("http-server"), u3k(it_pox)) ) {
else if ( c3y == u3r_sing_c("http-server", it_pox) ) {
u3_noun pud = tt_pox;
u3_noun p_pud, t_pud, tt_pud, q_pud, r_pud, s_pud;
c3_l sev_l, coq_l, seq_l;
@ -317,7 +317,7 @@ _reck_kick_spec(u3_pier* pir_u, u3_noun pox, u3_noun fav)
u3z(pox); u3z(fav);
return c3y;
}
else if ( c3y == u3rz_sing(u3i_string("http-client"), u3k(it_pox)) ) {
else if ( c3y == u3r_sing_c("http-client", it_pox) ) {
u3_cttp_ef_http_client(u3k(fav));
u3z(pox); u3z(fav);