Re: [Vala] Conditional compilation: Passing #ifdefs through to generated C code



version ( condition ) {
}
else {
}



void my_method () {
   [StaticIf]
   if (vala.pkg.gtk+-2.0.version > 2.4.0") {
       // Use new gtk+
   } else {
       // Use legacy gtk+
   }
}




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