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

Document C code #11

Closed
thedrow opened this issue Dec 18, 2013 · 3 comments
Closed

Document C code #11

thedrow opened this issue Dec 18, 2013 · 3 comments
Assignees
Labels

Comments

@thedrow
Copy link

thedrow commented Dec 18, 2013

The https://github.com/GrahamDumpleton/wrapt/blob/master/src/_wrappers.c file is undocumented and for those who aren't familiar with Python's C API it's not very clear what's going on.

@ghost ghost assigned GrahamDumpleton Dec 19, 2013
@GrahamDumpleton
Copy link
Owner

What is the specific thing you are trying to understand? Do you want to learn how to use the Python C APIs, or do you want to understand what this code is doing?

The code in the C file actually just mirrors what the wrappers.py file does in Python code and since the Python code is easier to understand, any comments about what it is all doing are given there. Only specific snippets of the C code which need to do something in a markedly different way than the equivalent Python code are documented.

In other words, start with the Python code and once you understand that, then compare that to the C code. If there are still then specific points of uncertainty, follow up here with questions.

@thedrow
Copy link
Author

thedrow commented Dec 19, 2013

I'm trying to figure out how exactly this project helps with monkey patching code.

@GrahamDumpleton
Copy link
Owner

Going to close out this issue. As already noted, since the Python version of the code mirrors what the C code does, it can be used as the means to study what is going on.

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

No branches or pull requests

2 participants