make string unify to symbols with the same name, a sneekey solution to make...

make string unify to symbols with the same name, a sneekey solution to make iso-prolog somewhat better upported
parent 8e81c290
......@@ -1325,6 +1325,37 @@ static SCM gp_unify(SCM *id1, SCM *id2, int raw, int gp_plus_unify, SCM *l, stru
return (SCM) 0;
}
if(scm_is_true(scm_string_p (scm1)))
{
if(scm_is_true(scm_procedure_p (scm2)))
{
scm2 = scm_procedure_name(scm2);
if(scm_is_true (scm2))
{
scm2 = scm_symbol_to_string (scm2);
goto equalp;
}
return (SCM) 0;
}
}
if(scm_is_true(scm_string_p (scm2)))
{
if(scm_is_true(scm_procedure_p (scm1)))
{
scm1 = scm_procedure_name(scm1);
if(scm_is_true (scm1))
{
scm1 = scm_symbol_to_string (scm1);
goto equalp;
}
return (SCM) 0;
}
}
equalp:
if(scm_is_true(scm_equal_p(scm1, scm2)))
{U_NEXT;}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment