Summary: | Tiny correction to the .vapi | ||
---|---|---|---|
Product: | PulseAudio | Reporter: | Corentin Noël <corentin> |
Component: | misc | Assignee: | pulseaudio-bugs |
Status: | RESOLVED FIXED | QA Contact: | pulseaudio-bugs |
Severity: | normal | ||
Priority: | medium | CC: | lennart |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Use the correct syntax |
Description
Corentin Noël
2016-12-26 10:54:45 UTC
Created attachment 128655 [details] [review] Use the correct syntax Thanks for the patch! So "static" was dropped from the declarations. Can you explain why "static" shouldn't be used? Do you have any guesses for why "static" was used in the first place? I'm sure your patch is correct, but I'd like to understand the patches that I apply, and I'm not familiar with Vala syntax. (In reply to Tanu Kaskinen from comment #2) > Thanks for the patch! > > So "static" was dropped from the declarations. Can you explain why "static" > shouldn't be used? Do you have any guesses for why "static" was used in the > first place? I'm sure your patch is correct, but I'd like to understand the > patches that I apply, and I'm not familiar with Vala syntax. This syntax was allowed on previous Vala version but this is a misuse of the "static" keyword. Only variables can be "static" and static means that the same content of the variable is accessible to any instances of an object. In Vala, const is the equivalent to preprocessor constant used in C, so here the right way to declare them is to use const and not static, or here "static const" Thanks for the explanation! I pushed the patch now to the "next" branch. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.