Re: [Vala] Set C representation of namespace manually?



Yes you can, put some CCode on top of your namespace:
https://wiki.gnome.org/Projects/Vala/Manual/Attributes#CCode_Attribute
Make sure you put the same CCode on all the files for the same namespace.


On Sun, Feb 23, 2014 at 11:54 PM, Matthias Klumpp <matthias tenstral net>wrote:

Hi!
For a library project, I would like to have some control over the
namespace-C-naming (especially the automatic camel-case-to-underscore
conversion). For example if I have a namespace
namespace MyProject {
  class Tree;
}
This translates to function names in form of
MyProjectTree *my_project_tree_new ()
but I would like to have
MyProjectTree *myproject_tree ();
(note the missing underscore)
If I change the namespace name to Myproject, I get correct function
naming, but the objects are named "wrong".
Is it possible to change the namespace C naming, without adding a
CCode cname to every class in a namespace?

Thanks for your help!
    Matthias

--
Debian Developer | Freedesktop-Developer
I welcome VSRE emails. See http://vsre.info/
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list




-- 
www.debian.org - The Universal Operating System


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