Re: [Vala] Glib types.



On 3/14/07, Jürg Billeter <j bitron ch> wrote:
On Die, 2007-03-13 at 22:29 -0300, Alexandre Moreira wrote:
> Is there a reason why Vala doesn't use the Glib typedefs to ensure the
> same size of variables in every machine (gint, gchar, etc) ?
>
> I think it would be nice to have string expand to gchar * and at least
> allow the user to use the others (as of now, gint gives an error)

gint, gchar, etc. are just typedefs to int, char, etc. as far as I know,
so that shouldn't make a difference - in contrast to e.g. gint64 which
Vala uses for its int64 type. We could easily switch to glib typedefs
but I don't see any advantages and it's not like they are that
widespread in GNOME C applications. I don't see a reason why we
shouldn't use glib typedefs either, so maybe you could explain why you
prefer gint to int?

Well, it is not that I have a huge preference. I just thought they'd
help portability. but I was mistaken. Checked glibs sources and
they're really simple typedefs. I just think of them as the preferred
way to develop G* based programs, but I can live with int and stuff
like that with no problems... actually I get some free syntax
highlight from Vim with CSharp filetype hehe

Thanks for the response,
Alexandre Moreira.

Jürg





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]