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

Appearance settings

Commit 5ad2408

Browse filesBrowse files
authored
Consolidate string handling in cxoTransform_toPython (#419)
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
1 parent 6dc0263 commit 5ad2408
Copy full SHA for 5ad2408

File tree

Expand file treeCollapse file tree

1 file changed

+3
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-6
lines changed

‎src/cxoTransform.c

Copy file name to clipboardExpand all lines: src/cxoTransform.c
+3-6Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -814,8 +814,11 @@ PyObject *cxoTransform_toPython(cxoTransformNum transformNum,
814814
timestamp->month, timestamp->day, timestamp->hour,
815815
timestamp->minute, timestamp->second,
816816
timestamp->fsecond / 1000);
817+
case CXO_TRANSFORM_FIXED_CHAR:
817818
case CXO_TRANSFORM_FIXED_NCHAR:
819+
case CXO_TRANSFORM_LONG_STRING:
818820
case CXO_TRANSFORM_NSTRING:
821+
case CXO_TRANSFORM_STRING:
819822
bytes = &dbValue->asBytes;
820823
return PyUnicode_Decode(bytes->ptr, bytes->length, bytes->encoding,
821824
encodingErrors);
@@ -854,12 +857,6 @@ PyObject *cxoTransform_toPython(cxoTransformNum transformNum,
854857
return cxoError_raiseAndReturnNull();
855858
return PyUnicode_Decode(rowid, rowidLength,
856859
connection->encodingInfo.encoding, NULL);
857-
case CXO_TRANSFORM_FIXED_CHAR:
858-
case CXO_TRANSFORM_STRING:
859-
case CXO_TRANSFORM_LONG_STRING:
860-
bytes = &dbValue->asBytes;
861-
return PyUnicode_Decode(bytes->ptr, bytes->length,
862-
bytes->encoding, encodingErrors);
863860
case CXO_TRANSFORM_TIMEDELTA:
864861
intervalDS = &dbValue->asIntervalDS;
865862
seconds = intervalDS->hours * 60 * 60 + intervalDS->minutes * 60 +

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.