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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,27200915cbff176 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-21 05:06:38 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: skibochka@yahoo.com (Andrew Skiba) Newsgroups: comp.lang.ada Subject: Re: Problem with C function pointers Date: 21 Dec 2003 05:06:38 -0800 Organization: http://groups.google.com Message-ID: <963c4dec.0312210506.27b8f4e1@posting.google.com> References: <963c4dec.0312191413.15c9cb08@posting.google.com> NNTP-Posting-Host: 213.8.52.165 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1072011998 8749 127.0.0.1 (21 Dec 2003 13:06:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 21 Dec 2003 13:06:38 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:3662 Date: 2003-12-21T05:06:38-08:00 List-Id: > Hmm. At this point "thiz" has the value "null". What do you expect? Well, you guessed! :-) > I suspect you left out some code, that sets "thiz". please post a > small compilable example, if possible. Obviously, the code I left out passed the pointer to "thiz" to a C function, which filled the rest of the structure, including the pointers to the functions. But I did an error in passing the pointer to "thiz", so "thiz" remained "null". > Have you tried running under gdb, and examining "thiz"? No, I printed it instead :-) It was "null", as you said. > Just out of curiosity, what does DirectFB do? This is a substitution for Windows DirectX on Linux. The FB stands for Frame Buffer, but DirectFB takes care not only of the screen (frame buffer), but also sound, keybord, mouse, as you might expect from DirectX. An interesting example of it is "links" web browser, which was originally text based, but with DirectFB you can see the graphics on linux console. Good thing for embedded and mini-distributions, which have no X. Thanks again, Andrew Skiba. P/S still waiting for someone to tell me "hey, this library was ported to Ada!"