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
Support for masks in getargs.c #37029
Comments
We need this implemented:
Plus a C API or two, e.g. PyInt_AsLongMask() -> |
Logged In: YES If nobody else comes up, I can do this. I also had similar |
Logged In: YES Thomas: that would be great! (As long it isn't killed by bw |
Logged In: YES But it would probably take a few days. What about these changes to the format codes, they are now Code C type Range check b unsigned char 0..UCHAR_MAX |
Logged In: YES A few days is fine (this doesn't need to make it into 2.3a2). But the proposal here is not backwards compatible, is it? I think we'll need to invent new format codes, or a new |
Logged In: YES Ok, I'll use your codes. Here is my suggestion for the C api functions: int PyInt_AsLongMask(PyObject *v, unsigned long *pval);
int PyInt_AsLongLongMask(PyObject *v, unsigned LONG_LONG *pval); return -1 and set exception on error, return 0 otherwise and |
Logged In: YES Currently the h code means signed short |
Logged In: YES Guido, |
Logged In: YES I've implemented the 'k' getargs code, and |
Logged In: YES I suggest writing on python-dev or python-list. |
Logged In: YES Uploading patch whcih implements the 'k' format code. Any |
Logged In: YES Patch is ready for review (although NEWS and docs are getargs.patch contains a context diff for several files, In the complete test-suite, test_array is crashing now as a |
Logged In: YES I forgot to say: kpatch.diff is obsolete, please ignore. |
Logged In: YES Review comments:
[guido@odiug linux]$ ./python ../Lib/test/test_capi.py
internal test_L_code
internal test_config
internal test_dict_iteration
internal test_k_code
Traceback (most recent call last):
File "../Lib/test/test_capi.py", line 16, in ?
raise test_support.TestFailed, sys.exc_info()[1]
test.test_support.TestFailed: test_k_code: k code returned
wrong value for long -0xFFF..000042
[guido@odiug linux]$ |
Logged In: YES Oops, sorry: getargs.c.diff |
Logged In: YES But wait: I'll fix the missing decrefs, and create a new, |
Logged In: YES getargs-2.patch, hopefully complete, but test_getargs2.py |
Logged In: YES Good enough; check it in, with docs and NEWS. But please fix these:
|
Logged In: YES Checked in with the changes you requested. Will do the docs on tuesday, NEWS today, if time permits. |
Logged In: YES Thanks! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: