Skip to content

Commit 796634b

Browse files
Corrected constant used to determine if a short length is used instead
of a long length.
1 parent fbcd395 commit 796634b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/oracledb/impl/thin/constants.pxi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ DEF TNS_OBJ_NO_PREFIX_SEG = 0x04
421421
DEF TNS_OBJ_IMAGE_VERSION = 1
422422

423423
# database object flags
424-
DEF TNS_OBJ_MAX_LENGTH = 245
424+
DEF TNS_OBJ_MAX_SHORT_LENGTH = 245
425425
DEF TNS_OBJ_ATOMIC_NULL = 253
426426
DEF TNS_OBJ_NON_NULL_OID = 0x02
427427
DEF TNS_OBJ_HAS_EXTENT_OID = 0x08

src/oracledb/impl/thin/dbobject.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ cdef class DbObjectPickleBuffer(Buffer):
122122
"""
123123
Writes the length to the buffer.
124124
"""
125-
if length <= TNS_MAX_SHORT_LENGTH:
125+
if length <= TNS_OBJ_MAX_SHORT_LENGTH:
126126
self.write_uint8(<uint8_t> length)
127127
else:
128128
self.write_uint8(TNS_LONG_LENGTH_INDICATOR)

0 commit comments

Comments
 (0)