Skip to content

Commit f3faed6

Browse files
generatedunixname537391475639613meta-codesync[bot]
authored andcommitted
fbcode/cinderx/StaticPython/generic_type.c
Reviewed By: yoney Differential Revision: D83820444 fbshipit-source-id: a2589cb1b493215ad330a96bfb228008eb33e766
1 parent a465b97 commit f3faed6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

cinderx/StaticPython/generic_type.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ PyObject* gti_calc_name(PyObject* type, _PyGenericTypeInst* new_inst) {
143143

144144
Py_ssize_t len = strlen(orig_name);
145145
for (int i = 0; i < nargs; i++) {
146-
PyTypeObject* type = new_inst->gti_inst[i].gtp_type;
147-
len += strlen(type->tp_name);
146+
PyTypeObject* param_type = new_inst->gti_inst[i].gtp_type;
147+
len += strlen(param_type->tp_name);
148148
if (new_inst->gti_inst[i].gtp_optional) {
149149
len += strlen("Optional[]");
150150
}
@@ -155,14 +155,14 @@ PyObject* gti_calc_name(PyObject* type, _PyGenericTypeInst* new_inst) {
155155
strncpy(buf, orig_name, start - orig_name + 1);
156156
buf[start - orig_name + 1] = 0;
157157
for (int i = 0; i < nargs; i++) {
158-
PyTypeObject* type = new_inst->gti_inst[i].gtp_type;
158+
PyTypeObject* param_type = new_inst->gti_inst[i].gtp_type;
159159
if (i != 0) {
160160
strcat(buf, ", ");
161161
}
162162
if (new_inst->gti_inst[i].gtp_optional) {
163163
strcat(buf, "Optional[");
164164
}
165-
strcat(buf, type->tp_name);
165+
strcat(buf, param_type->tp_name);
166166
if (new_inst->gti_inst[i].gtp_optional) {
167167
strcat(buf, "]");
168168
}

0 commit comments

Comments
 (0)