[m-rev.] diff: add missing can_pass_as_mercury_type attribute
Julien Fischer
jfischer at opturion.com
Sat Jun 26 17:17:36 AEST 2021
Add missing can_pass_as_mercury_type attribute.
library/array.m:
Set the can_pass_as_mercury attribute on the C foreign_type
for array/1.
Julien.
diff --git a/library/array.m b/library/array.m
index 840557b..b3e5b6a 100644
--- a/library/array.m
+++ b/library/array.m
@@ -2,7 +2,7 @@
% vim: ft=mercury ts=4 sw=4 et
%---------------------------------------------------------------------------%
% Copyright (C) 1993-1995, 1997-2012 The University of Melbourne.
-% Copyright (C) 2013-2018 The Mercury team.
+% Copyright (C) 2013-2021 The Mercury team.
% This file is distributed under the terms specified in COPYING.LIB.
%---------------------------------------------------------------------------%
%
@@ -849,7 +849,8 @@
%
% MR_ArrayPtr is defined in runtime/mercury_types.h.
-:- pragma foreign_type("C", array(T), "MR_ArrayPtr")
+:- pragma foreign_type("C", array(T), "MR_ArrayPtr",
+ [can_pass_as_mercury_type])
where equality is array.array_equal,
comparison is array.array_compare.
More information about the reviews
mailing list