Skip to content

Commit 28a7cac

Browse files
author
erlanger
committed
Fix doc for qsave_foreign_libraries/4
1 parent 29ba60c commit 28a7cac

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

library/shlib.pl

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -246,26 +246,32 @@
246246
release(true)
247247
]).
248248

249-
%! qsave_foreign_libraries(+Arch, +FileSpec, -Resources, +Options).
249+
%! qsave_foreign_libraries(+Arch, +FileSpec, -Entries, +Options).
250250
%
251-
% Get list of foreign libraries compatible with Arch in the
252-
% current saved state.
251+
% Get list of foreign libraries compatible with Arch in the current
252+
% saved state.
253253
%
254254
% Multi-architecture foreign libraries can be stored in the saved
255-
% state by qsave_program/2. See the `foreign` option. Resources is
256-
% unified with a list of file paths (in the saved state) for the
257-
% foreign library named by FileSpec. FileSpec is of the form
258-
% `foreign(Name)`. Each resource starts with `res://` so it can
259-
% be used with most file predicates, including copy_file/2. The
260-
% predicate can return the main foreign library (which defines
261-
% prolog predicates in a foreign language) and possibly its
255+
% state by qsave_program/2. See the `foreign` option. Entries is
256+
% unified with a list of dicts of the form: `_{ entry: Resource,
257+
% basename: Base, type: Type }`. Each dict contains a description of
258+
% the entries in the saved state for FileSpec and compatible with
259+
% Arch. Resource starts with `res://` so it can be used
260+
% with most file predicates, including copy_file/2. `Base` is the
261+
% original base name of the file, this is especially useful for
262+
% dependencies which need to have the same name so that the linker
263+
% finds them. Type is either `main` or `dep` indicating the main
264+
% library or a dependency.
265+
%
266+
% The predicate can return only the main foreign library (which
267+
% defines prolog predicates in a foreign language) and possibly its
262268
% dependencies according to the options.
263269
%
264270
% See qsave_program/2 to find out about how to store the
265271
% dependencies of a shared object.
266272
%
267-
% This predicate also calls the qsave:compat_arch/2 hook to obtain
268-
% files compatible with Arch, see qsave_program/2.
273+
% This predicate also calls the qsave:compat_arch/2 hook to
274+
% determine architecture compatibility, see qsave_program/2.
269275
%
270276
% The possible options are:
271277
% * main
@@ -275,6 +281,8 @@
275281
% Return the main foreign lirary and any dependencies that
276282
% were stored in the saved state. Resources is a list in this
277283
% case. This is the default option.
284+
% * deps
285+
% Return only the dependencies.
278286
% * plain
279287
% Do not return entries with the `res://` prefix, but
280288
% just the plain entry name in the saved state. This can

0 commit comments

Comments
 (0)