From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,47ad7b1ec6646e16 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-26 05:46:03 PST Path: supernews.google.com!sn-xit-03!supernews.com!cyclone2.usenetserver.com!news-out.usenetserver.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3ABF3A34.D961881E@earthlink.net> From: "Marc A. Criley" Organization: Quadrus Corporation X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How pass a "null" as a parameter of anonymous access type References: <3ABA5AC3.4C6C7536@t-online.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 26 Mar 2001 13:44:35 GMT NNTP-Posting-Host: 63.178.180.37 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 985614275 63.178.180.37 (Mon, 26 Mar 2001 05:44:35 PST) NNTP-Posting-Date: Mon, 26 Mar 2001 05:44:35 PST Xref: supernews.google.com comp.lang.ada:6046 Date: 2001-03-26T13:44:35+00:00 List-Id: Freddy wrote: > > Hello ! > > I want call a C-binding procedure which is defined as "procedure p (a : > access X; b : access Y);" > Both a or b may be a null pointer, but Ada say "null not allowed for > anonymous access type". > Any idea what to do ? Here's another approach, which worked with JGNAT both at compile-time and run-time: type X_Access is access all X; type Y_Access is access all Y; Null_X : constant X_Access := null; Null_Y : constant Y_Access := null; ... P(Null_X'access, Null_Y'access); Even if this works (which it shouldn't), you should submit a bug report to the providers of the binding stating that the C routine can accept a null value, which their binding does not support. Marc A. Criley Senior Staff Engineer Quadrus Corporation www.quadruscorp.com