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

Add Tcl 9 compatibility - Tcl_Size in python module #1669

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/mod/python.mod/pycmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ static int tcl_call_python(ClientData cd, Tcl_Interp *irp, int objc, Tcl_Obj *co
}

static PyObject *py_parse_tcl_list(PyObject *self, PyObject *args) {
int max;
Tcl_Size max;
const char *str;
Tcl_Obj *strobj;
PyObject *result;
Expand All @@ -175,7 +175,7 @@ static PyObject *py_parse_tcl_list(PyObject *self, PyObject *args) {
for (int i = 0; i < max; i++) {
Tcl_Obj *tclobj;
const char *tclstr;
int tclstrlen;
Tcl_Size tclstrlen;

Tcl_ListObjIndex(tclinterp, strobj, i, &tclobj);
tclstr = Tcl_GetStringFromObj(tclobj, &tclstrlen);
Expand Down Expand Up @@ -203,7 +203,7 @@ static PyObject *py_parse_tcl_dict(PyObject *self, PyObject *args) {
}
result = PyDict_New();
while (!done) {
int len;
Tcl_Size len;
const char *valstr = Tcl_GetStringFromObj(value, &len);
PyObject *pyval = PyUnicode_DecodeUTF8(valstr, len, NULL);
PyDict_SetItemString(result, Tcl_GetString(key), pyval);
Expand Down