slots
This commit is contained in:
parent
06bbdfd553
commit
1e118bee6d
12
CXX/yapi.cpp
12
CXX/yapi.cpp
@ -553,17 +553,15 @@ bool YAPQuery::next() {
|
|||||||
|
|
||||||
if (q_state == 0) {
|
if (q_state == 0) {
|
||||||
result = (bool)YAP_EnterGoal((YAP_PredEntryPtr)ap, q_g, &q_h);
|
result = (bool)YAP_EnterGoal((YAP_PredEntryPtr)ap, q_g, &q_h);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
LOCAL_AllowRestart = q_open;
|
LOCAL_AllowRestart = q_open;
|
||||||
result = (bool)YAP_RetryGoal(&q_h);
|
result = (bool)YAP_RetryGoal(&q_h);
|
||||||
}
|
}
|
||||||
{
|
if (result) {
|
||||||
if (result)
|
__android_log_print(ANDROID_LOG_INFO, "YAPDroid", "vnames %d %s %d",
|
||||||
__android_log_print(ANDROID_LOG_INFO, "YAPDroid", "vnames %d %s %d",
|
|
||||||
q_state, vnames.text(), LOCAL_CurSlot);
|
q_state, vnames.text(), LOCAL_CurSlot);
|
||||||
else
|
} else {
|
||||||
__android_log_print(ANDROID_LOG_INFO, "YAPDroid", "fail");
|
__android_log_print(ANDROID_LOG_INFO, "YAPDroid", "fail");
|
||||||
}
|
}
|
||||||
q_state = 1;
|
q_state = 1;
|
||||||
if (Yap_GetException()) {
|
if (Yap_GetException()) {
|
||||||
@ -573,6 +571,7 @@ bool YAPQuery::next() {
|
|||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
YAP_LeaveGoal(FALSE, &q_h);
|
YAP_LeaveGoal(FALSE, &q_h);
|
||||||
|
Yap_CloseHandles(q_handles);
|
||||||
q_open = false;
|
q_open = false;
|
||||||
} else {
|
} else {
|
||||||
q_handles = Yap_StartSlots();
|
q_handles = Yap_StartSlots();
|
||||||
@ -618,6 +617,7 @@ void YAPQuery::close() {
|
|||||||
}
|
}
|
||||||
YAP_LeaveGoal(FALSE, &q_h);
|
YAP_LeaveGoal(FALSE, &q_h);
|
||||||
q_open = 0;
|
q_open = 0;
|
||||||
|
Yap_CloseHandles(q_handles);
|
||||||
// LOCAL_execution = this;
|
// LOCAL_execution = this;
|
||||||
RECOVER_MACHINE_REGS();
|
RECOVER_MACHINE_REGS();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user