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

Enhance CredDelete to work with dictionaries #2198

Merged
merged 2 commits into from
Mar 12, 2024

Conversation

CristiFati
Copy link
Contributor

Fix for #1775.

As a rule of thumb I consider that if there's a pair of functions: a getter and a setter, the latter should work with whatever the former returns. Applied to current situation CredDelete (and maybe others?) should work with a CREDENTIAL structure (converted to a dictionary). In most of the cases that should be the only thing that it should work with, but in this current scenario this doesn't apply.

Copy link
Owner

@mhammond mhammond left a comment

Choose a reason for hiding this comment

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

Thanks!

@@ -82,7 +82,8 @@ BOOL PyWinObject_AsCREDENTIAL_ATTRIBUTE(PyObject *obattr, PCREDENTIAL_ATTRIBUTE
if (PyUnicode_AsWideChar(obValue, (wchar_t *)attr->Value, nchars) == -1) {
goto done;
}
} else {
}
Copy link
Owner

Choose a reason for hiding this comment

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

For future reference, please leave the existing conventions alone where you can - I hate this indentation style :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could not agree more with you regarding the indent style.
However, it wasn't me who changed it (not voluntarily at least), but the CLang formatting tool (it was the last place in the file which wasn't compliant). Hmm, will take a look at the spec file to see if this thing (alone) can be changed.

Copy link
Owner

Choose a reason for hiding this comment

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

welp, I gotta admit that consistency enforced by a tool does tend to trump my personal preference, so I guess I'm fine with that :)

@mhammond mhammond merged commit 1d29e4a into mhammond:main Mar 12, 2024
16 checks passed
@CristiFati CristiFati deleted the cfati_dev09 branch March 28, 2024 15:35
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