This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2016年05月01日 18:45 by serhiy.storchaka, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue26902_sample.c | serhiy.storchaka, 2016年05月01日 18:47 | |||
| Messages (3) | |||
|---|---|---|---|
| msg264606 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年05月01日 18:45 | |
Argument Clinic uses original name of Python parameter in generated code for custom (format code "O&") converter even if the parameter was renamed.
Example:
/*[clinic input]
test
filename as path: object(converter="PyUnicode_FSConverter")
/
[clinic start generated code]*/
Generated code:
static PyObject *
test(PyModuleDef *module, PyObject *arg)
{
PyObject *return_value = NULL;
PyObject *path;
if (!PyUnicode_FSConverter(arg, &filename))
goto exit;
return_value = test_impl(module, path);
exit:
return return_value;
}
|
|||
| msg264627 - (view) | Author: Larry Hastings (larry) * (Python committer) | Date: 2016年05月02日 06:39 | |
This is caused by your "meth_o inline" code, which isn't checked in yet. A clean checkout of CPython trunk generates this correct code: if (!PyArg_Parse(arg, "O&:test", PyUnicode_FSConverter, &path)) Maybe you don't need to use bugs.python.org as your personal bug tracker; maybe you don't need to add me to your private bugs. |
|||
| msg264630 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年05月02日 08:33 | |
You are right. Sorry for the noise. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:30 | admin | set | github: 71089 |
| 2016年05月02日 08:33:16 | serhiy.storchaka | set | messages: + msg264630 |
| 2016年05月02日 06:39:29 | larry | set | status: open -> closed resolution: not a bug messages: + msg264627 stage: resolved |
| 2016年05月01日 18:49:25 | serhiy.storchaka | set | title: Argument Clinic incorrectly work with custom converter and renamed parameter -> Argument Clinic incorrectly works with custom converter and renamed parameter |
| 2016年05月01日 18:49:00 | serhiy.storchaka | link | issue23867 dependencies |
| 2016年05月01日 18:47:29 | serhiy.storchaka | set | files: + issue26902_sample.c |
| 2016年05月01日 18:45:28 | serhiy.storchaka | create | |