Front page | perl.perl6.users |
Postings from November 2022
Re: What is this "\t"?
Thread Previous
|
Thread Next
From:
Elizabeth Mattijsen
Date:
November 29, 2022 14:08
Subject:
Re: What is this "\t"?
Message ID:
BF0121D2-FCC0-41BF-ACEA-7839D93F5C09@dijkmat.nl
Perhaps it would make sense to export these to a separate Gnome::Constants module?
> On 29 Nov 2022, at 15:05, Marcel Timmerman <mt1957@gmail.com> wrote:
>
> On 29-11-2022 10:13, Francis Grizzly Smit wrote:
>
> Hi Francis,
>>
>> Personally I never use \name are I hate how it looks, and so far I have never needed it, so unless I can find something it can do that I cannot do any other way, I'll keep on not using it
>>
> To show an example where I could use it I have defined a series of types in the Gnome packages of mine and could then use it everywhere as a type. The glib has several types defined which I wanted to use in my code so that I can cut and paste the code from the C source into Raku source without much changes.
>
> There is a file defined in Gnome::N where a list of types is defined
> …
> constant \gboolean is export = int32;
> constant \gchar is export = int8;
> constant \gdouble is export = num64;
> constant \gfloat is export = num32;
> constant \gint is export = int32;
> …
>
>
> And later in other modules I could then use these definitions, here for example 'gint'.
>
> …
> sub gtk_widget_add_events (
> N-GObject $widget, gint $events
> ) is native(>k-lib)
> { * }
> …
>
> The types file is generated to cope with int sizes differing on several implementations. E.g. a long int could be 32 or 64 bits depending on the implementation or OS or chip or ….
>
Thread Previous
|
Thread Next