Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make more static arrays const #65

Merged
merged 3 commits into from
Jul 5, 2024
Merged

Conversation

ccawley2011
Copy link
Contributor

See also libxmp/libxmp#752.

@sezero sezero requested a review from AliceLR June 27, 2024 13:22
@sezero
Copy link
Collaborator

sezero commented Jul 5, 2024

This is OK by me. @AliceLR ?

And here is a follow-up patch to change driver description into a
driver specific function call: removes the TODO note in sound_oss.
patch.txt

@sezero
Copy link
Collaborator

sezero commented Jul 5, 2024

And here is a follow-up patch to change driver description into a
driver specific function call: removes the TODO note in sound_oss.
patch.txt

And if we apply that, maybe we can revert 0e44b4e and adapt? (worth it?)

@AliceLR AliceLR merged commit 041ee9f into libxmp:master Jul 5, 2024
1 check passed
@sezero
Copy link
Collaborator

sezero commented Jul 5, 2024

Now that this is in, should I create a new PR for the patch above?

@AliceLR
Copy link
Contributor

AliceLR commented Jul 5, 2024

And here is a follow-up patch

+static const char *desc_default = "OSS PCM audio";
+static char descbuf[80] = {0};

Given the whole point of this is to reduce the number of mutable globals/statics: this should be computed by the description function and returned via a caller-owned buffer IMO.

And if we apply that, maybe we can revert 0e44b4e and adapt? (worth it?)

Yes, that sounds OK to me.

@sezero
Copy link
Collaborator

sezero commented Jul 5, 2024

And here is a follow-up patch

+static const char *desc_default = "OSS PCM audio";
+static char descbuf[80] = {0};

Given the whole point of this is to reduce the number of mutable globals/statics: this should be computed by the description function and returned via a caller-owned buffer IMO.

Do you have a patch (or a draft of it) ?

@AliceLR
Copy link
Contributor

AliceLR commented Jul 5, 2024

Do you have a patch (or a draft of it) ?

No, I only just saw your patch a moment ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants