more SWI compatibility changes.
This commit is contained in:
@@ -24,6 +24,12 @@
|
||||
|
||||
#include "swi.h"
|
||||
|
||||
static PL_blob_t unregistered_blob_atom =
|
||||
{ PL_BLOB_MAGIC,
|
||||
PL_BLOB_NOCOPY|PL_BLOB_TEXT,
|
||||
"unregistered"
|
||||
};
|
||||
|
||||
|
||||
PL_EXPORT(int)
|
||||
PL_is_blob(term_t t, PL_blob_t **type)
|
||||
@@ -75,13 +81,13 @@ PL_blob_data(atom_t a, size_t *len, struct PL_blob_t **type)
|
||||
if ( len )
|
||||
*len = wcslen(x->WStrOfAE);
|
||||
if ( type )
|
||||
*type = SWI_Blobs;
|
||||
*type = &unregistered_blob_atom;
|
||||
return x->WStrOfAE;
|
||||
}
|
||||
if ( len )
|
||||
*len = strlen(x->StrOfAE);
|
||||
if ( type )
|
||||
*type = SWI_Blobs;
|
||||
*type = &unregistered_blob_atom;
|
||||
return x->StrOfAE;
|
||||
}
|
||||
if ( len )
|
||||
@@ -112,7 +118,7 @@ YAP_find_blob_type(YAP_Atom at)
|
||||
{
|
||||
AtomEntry *a = RepAtom((Atom)at);
|
||||
if (!IsBlob(a)) {
|
||||
return SWI_Blobs;
|
||||
return &unregistered_blob_atom;
|
||||
}
|
||||
return RepBlobProp(a->PropsOfAE)->blob_t;
|
||||
}
|
||||
|
@@ -2115,11 +2115,9 @@ X_API int
|
||||
PL_recorded(record_t db, term_t ts)
|
||||
{
|
||||
Term t = YAP_Recorded((void *)db);
|
||||
fprintf(stderr,"PL_recorded %ld\n", t);
|
||||
if (t == ((CELL)0))
|
||||
return FALSE;
|
||||
Yap_PutInSlot(ts,t);
|
||||
fprintf(stderr,"PL_recorded\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user