[Vala] How to generate "inline" C functions?
- From: PCMan <pcman tw gmail com>
- To: vala-list <vala-list gnome org>
- Subject: [Vala] How to generate "inline" C functions?
- Date: Sun, 6 Nov 2011 00:15:07 +0800
Hi list,
Is there any CCode attribute to make the generated C function "inline"?
Or, is it possible to generate C macros instead of functions with vala?
For example:
class Test {
inline public void func1() {
}
[Macro]
public void func2() {
}
}
The generated result:
inline void test_func1(Test* test) {
}
#define test_func2(test) { \
}
Another question is, is it possible to use bit-field in vala classes?
Like this:
class Test {
private bool b1 : 1;
private bool b2 : 1;
private bool b3 : 1;
private uint i1 : 4;
}
These questions are mostly for performance reason.
Otherwise I'm satisfied with vala.
These features are what I frequently used in C/C++ and I hope that I can
have them in Vala.
Thanks
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]