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

Try to restore PyString_FromStringAndSize in RealDisplaySizeMM.c (with proper Unicode version) #6

Closed
eoyilmaz opened this issue Feb 8, 2022 · 1 comment

Comments

@eoyilmaz
Copy link
Owner

eoyilmaz commented Feb 8, 2022

To fix the code from raising errors and not doing what it suppose to do, the PyString_FromStringAndSize has been replaced with PyString_FromString. I'm not experienced with C-Extension stuff, so it might broke something:

The following is replaced:

            if (dp[i]->edid_len > 0 && dp[i]->edid != NULL &&
               (value = PyString_FromStringAndSize(dp[i]->edid, dp[i]->edid_len)) != NULL) {
                PyDict_SetItemString(d, "edid", value);
            }

with:

            if (dp[i]->edid_len > 0 && dp[i]->edid != NULL &&
                (value = PyString_FromString(dp[i]->edid)) != NULL) {
                PyDict_SetItemString(d, "edid", value);
            }

Investigate what is the expected output and what we are getting currently.

@eoyilmaz
Copy link
Owner Author

This is fixed in e76da19

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

No branches or pull requests

1 participant