misc
This commit is contained in:
parent
94621bf8f2
commit
4b3aedccb5
@ -1731,7 +1731,7 @@ void Yap_InitFlags(bool bootstrap) {
|
||||
|
||||
Obtain the value for a YAP Prolog flag, same as current_prolog_flag/2.
|
||||
*/
|
||||
Yap_InitCPredBack("prolog_flag", 3, 1, current_prolog_flag, cont_yap_flag,
|
||||
Yap_InitCPredBack("prolog_flag", 3, 1, prolog_flag, cont_yap_flag,
|
||||
0);
|
||||
Yap_InitCPredBack("yap_flag", 3, 1, yap_flag, cont_yap_flag, 0);
|
||||
Yap_InitCPredBack("prolog_flag", 2, 1, current_prolog_flag2,
|
||||
|
@ -283,3 +283,7 @@ void Yap_ReOpenLoadForeign(void) {
|
||||
}
|
||||
CurrentModule = OldModule;
|
||||
}
|
||||
|
||||
X_API bool load_none(void)
|
||||
{
|
||||
}
|
||||
|
@ -129,4 +129,10 @@ void Yap_ShutdownLoadForeign(void);
|
||||
#define EAGER_LOADING 1
|
||||
#define GLOBAL_LOADING 2
|
||||
|
||||
/**
|
||||
* stub can always be called at DLL loading.
|
||||
*
|
||||
*/
|
||||
X_API bool load_none(void);
|
||||
|
||||
#endif
|
||||
|
@ -640,7 +640,7 @@ static JNIEnv*
|
||||
jni_env(void) /* economically gets a JNIEnv pointer, valid for this thread */
|
||||
{ JNIEnv *env;
|
||||
|
||||
switch( (*jvm)->GetEnv(jvm, (void**)&env, JNI_VERSION_1_2) )
|
||||
switch( (*jvm)->GetEnv(jvm, (void**)&env, JNI_VERSION_1_8) )
|
||||
{ case JNI_OK:
|
||||
return env;
|
||||
case JNI_EDETACHED:
|
||||
|
@ -333,8 +333,8 @@ X_API extern Term YAP_MkCharPTerm( char *n);
|
||||
%template(TermVector) vector<Term>;
|
||||
%feature("novaluewrapper") vector<Term>;
|
||||
|
||||
//%template(YAPTermVector) vector<YAPTerm>;
|
||||
//%feature("novaluewrapper") vector<YAPTerm>;
|
||||
%template(YAPTermVector) vector<YAPTerm>;
|
||||
%feature("novaluewrapper") vector<YAPTerm>;
|
||||
|
||||
|
||||
|
||||
|
@ -39,11 +39,6 @@
|
||||
|
||||
*/
|
||||
|
||||
maplist_(_, [], []).
|
||||
maplist_(Pred, [A1|L1], [A2|L2]) :-
|
||||
call(Pred, A1, A2),
|
||||
maplist_(Pred, L1, L2).
|
||||
|
||||
/** @pred load_foreign_files( _Files_, _Libs_, _InitRoutine_)
|
||||
|
||||
should be used, from inside YAP, to load object files produced by the C
|
||||
@ -74,8 +69,8 @@ load_foreign_files(Objs,Libs,Entry) :-
|
||||
access(read),
|
||||
expand(true),
|
||||
file_errors(fail)], NewObjs),
|
||||
maplist_( '$load_lib', Libs, NewLibs),
|
||||
'$load_foreign_files'(NewObjs,NewLibs,Entry),
|
||||
'$load_libs'( Libs ),
|
||||
'$load_foreign_files'(NewObjs,[],Entry),
|
||||
!,
|
||||
prolog_load_context(file, F),
|
||||
ignore( recordzifnot( '$load_foreign_done', [F, M], _) ).
|
||||
@ -95,7 +90,10 @@ load_foreign_files(Objs,Libs,Entry) :-
|
||||
'$name_object'(I, P, O) :-
|
||||
absolute_file_name(I, O, P).
|
||||
|
||||
'$load_lib'(_,L,L).
|
||||
'$load_libs'([]).
|
||||
'$load_libs'([File|Files]) :-
|
||||
open_shared_object(File, _Handle),
|
||||
'$load_libs'(Files).
|
||||
|
||||
/** @pred load_absolute_foreign_files( Files, Libs, InitRoutine)
|
||||
|
||||
|
Reference in New Issue
Block a user