Hi,

If I'm declaring a private variable/funtion/class and compile it to a
"package" (.so), it is not shown up in the .h and .vapi, this is ok.

However, all this symbols ARE exported in the .so symbol table!

If one bind more than one .so with e.g. the same PRIVATE variable named
"testVar" it acts like a one single global variable/function, but it
should be private!

I think valac should compile private variables/functions using the C
"static" modifier?


Example .vala file:

private int testVar;
private void TestFunc(string str) {
   print("TestFunc"+str);
}
private class TestClass : GLib.Object {
   private int data;
   public TestClass() {
      this.data = 5;
   }
   public void Method1() {
      print("Method1");
   }
}

Excerpt from .so symbol Table:

00000d3c T TestFunc
0000309c B testVar
00000e38 T testclass_Method1
00000dcf T testclass_construct
00000f60 T testclass_get_type
00000e13 T testclass_new




-- 
Ulink
_______________________________________________
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to