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

Add sknobs_prepend #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ghaushe
Copy link

@ghaushe ghaushe commented Aug 9, 2021

With VCS the library includes are order dependent. We need the ability to ensure certain knobs are set before others.

This patch introduces 'sknobs.prepend' which pushes knobs onto the head of the linked-list instead of the tail.

@@ -13,10 +13,12 @@ sknobs.init(sys.argv)
sknobs.set_value('abc', 4)
sknobs.set_string('xyz', 'there')
sknobs.add('ttt', 'tttvalue')
sknobs.add('ttt', 'pre_tttvalue')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intend "prepend" here?

@@ -12,6 +12,7 @@ extern int sknobs_init(int argc, char **argv);
extern void sknobs_close(void);

extern int sknobs_add(char *pattern, char *value, char *comment);
extern int sknobs_prepend(char *pattern, char *value, char *comment);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the associated sknobs.c implementation missing from this PR?

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.

2 participants