writing hook for opaque terms.

This commit is contained in:
Vitor Santos Costa 2011-07-30 00:06:52 +01:00
parent 169758af5e
commit 545a3a2b03

View File

@ -886,10 +886,16 @@ writePrimitive(term_t t, write_options *options)
#if __YAP_PROLOG__
{
number n;
n.type = V_INTEGER;
n.value.i = 0;
return WriteNumber(&n, options);
Opaque_CallOnWrite f;
if ( (f = Yap_blob_write_handler_from_slot(t)) ) {
return (f)(options->out, Yap_blob_tag_from_slot(t), Yap_blob_info_from_slot(t), options->flags);
} else {
number n;
n.type = V_INTEGER;
n.value.i = 0;
return WriteNumber(&n, options);
}
}
#endif