Re: [Vala] Scoping error in public constant members
- From: Jürg Billeter <j bitron ch>
- To: Cayle Graumann <cayle graumann gmail com>
- Cc: vala <vala paldo org>
- Subject: Re: [Vala] Scoping error in public constant members
- Date: Thu, 31 Aug 2006 16:27:07 +0200
Hi Cayle,
On Mit, 2006-08-30 at 22:50 -0500, Cayle Graumann wrote:
I have found another unexpected error. The following code
works correctly if Error3a and Error3b are in the same file, but if
you separate them into different files, the vala compiler will compile
them properly, however the C compilation step will complain about
ERROR3_CONSTANT_HOLDER1_X not being defined in the second file.
Looking at the C code generated by vala, you have defined public const
variables as being static variables in the resulting C file, thus it's
scope is not visible outside the c file. Perhaps instead of being
static, they should be global variables and declared as extern in the
resulting c header file. The current method would still be
appropriate for private const variables.
Or maybe keep them static but just put public constants in the c header
file. That should use less memory or am I mistaken here?
Jürg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]