> On Monday, 29 January 2018, 07:26:22 GMT, Manish Jain
wrote:
> Does 'internal' hook into the Vala package system, meaning internal > members
> cannot be accessed from a different package ?
A simple library like:
[CCode (gir_namespace = "libexample", gir_version = "0.1")]
namespace ExampleLib {
public void test () {
WhateverNameYouLikeForInternalUse.do_some_work ();
}
}
namespace WhateverNameYouLikeForInternalUse {
internal void do_some_work () {
print( "Internal test function called\n" );
}
}
compiled with the --hide-internal option like:valac demo.vala -X -fPIC -X
-shared --hide-internal --library libexample --header libexample.h --gir
libexample-0.1.gir --output libexample.so
will not show the internal function in the symbol table of the library. To see
the symbols use:readelf --dyn-syms --wide libexample.so
If you look at the C code produced you should see the G_GNUCINTERNAL_MACRO
being
used:https://developer.gnome.org/glib/stable/glib-Miscellaneous-Macros.html#G-GNUC-INTERNAL:CAPS
I understand DLLs compiled for Windows with MSVC using a different arrangement
- the symbols are hiddenby default. Vala doesn't currently do anything about
that.
Regards,
Al
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list