Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcfd9c87

Browse files
committed
Only treat Python Lists as array dimensions.
Instead of treating all python sequence types as array dimensions, exceptfor tuples and various kinds of strings, only treat Python lists asdimensions. The PyBytes_Check() function used previously is only availableon Python 2.6 and newer, and it was a bit fiddly anyway. The list ofexceptions would require adjustment if Python got a new kind of a sequencesimilar to bytes/unicodes/strings, so only checking for Lists seems morefuture-proof. The documentation only mentioned using Lists, so this iscloser to what was documented, anyway.This should fix the buildfarm failures on systems building with Python 2.5,although I don't have Python 2.5 installed myself to test with.
1 parent73c8e85 commitcfd9c87

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

‎src/pl/plpython/plpy_typeio.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -999,15 +999,7 @@ PLySequence_ToArray(PLyObToDatum *arg, int32 typmod, PyObject *plrv, bool inarra
999999

10001000
for (;;)
10011001
{
1002-
if (!PySequence_Check(pyptr))
1003-
break;
1004-
1005-
/* composite type */
1006-
if (PyTuple_Check(pyptr))
1007-
break;
1008-
1009-
/* string */
1010-
if (PyString_Check(pyptr)||PyBytes_Check(pyptr)||PyUnicode_Check(pyptr))
1002+
if (!PyList_Check(pyptr))
10111003
break;
10121004

10131005
if (ndim==MAXDIM)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp