Bug 99199 - Tiny correction to the .vapi
Summary: Tiny correction to the .vapi
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-26 10:54 UTC by Corentin Noël
Modified: 2017-01-07 00:38 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Use the correct syntax (13.81 KB, patch)
2016-12-26 10:55 UTC, Corentin Noël
Details | Splinter Review

Description Corentin Noël 2016-12-26 10:54:45 UTC
Here is a small correction to use the right Vala syntax
Comment 1 Corentin Noël 2016-12-26 10:55:18 UTC
Created attachment 128655 [details] [review]
Use the correct syntax
Comment 2 Tanu Kaskinen 2017-01-03 17:28:08 UTC
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.
Comment 3 Corentin Noël 2017-01-05 17:55:50 UTC
(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"
Comment 4 Tanu Kaskinen 2017-01-07 00:38:28 UTC
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.