@@ -986,7 +986,7 @@ static PyObject *_python_IfxPy_register_smart_trigger_helper(PyObject *self, PyO
986986 return NULL ;
987987 }
988988
989- objectSize = PyUnicode_GET_DATA_SIZE (tableNameObj );
989+ objectSize = PyUnicode_GET_LENGTH (tableNameObj );
990990 tableName = (SQLWCHAR * )malloc ((int )objectSize * sizeof (SQLWCHAR ) + sizeof (SQLWCHAR ));
991991 if (tableName == NULL )
992992 {
@@ -1011,7 +1011,7 @@ static PyObject *_python_IfxPy_register_smart_trigger_helper(PyObject *self, PyO
10111011 PyErr_SetString (PyExc_Exception , "statement must be a string or unicode" );
10121012 return NULL ;
10131013 }
1014- objectSize = PyUnicode_GET_DATA_SIZE (ownerNameObj );
1014+ objectSize = PyUnicode_GET_LENGTH (ownerNameObj );
10151015 ownerName = (SQLWCHAR * )malloc ((int )objectSize * sizeof (SQLWCHAR ) + sizeof (SQLWCHAR ));
10161016 if (ownerName == NULL )
10171017 {
@@ -1036,7 +1036,7 @@ static PyObject *_python_IfxPy_register_smart_trigger_helper(PyObject *self, PyO
10361036 PyErr_SetString (PyExc_Exception , "statement must be a string or unicode" );
10371037 return NULL ;
10381038 }
1039- objectSize = PyUnicode_GET_DATA_SIZE (dbNameObj );
1039+ objectSize = PyUnicode_GET_LENGTH (dbNameObj );
10401040 dbName = (SQLWCHAR * )malloc ((int )objectSize * sizeof (SQLWCHAR ) + sizeof (SQLWCHAR ));
10411041 if (dbName == NULL )
10421042 {
@@ -1061,7 +1061,7 @@ static PyObject *_python_IfxPy_register_smart_trigger_helper(PyObject *self, PyO
10611061 PyErr_SetString (PyExc_Exception , "statement must be a string or unicode" );
10621062 return NULL ;
10631063 }
1064- objectSize = PyUnicode_GET_DATA_SIZE (sqlQueryObj );
1064+ objectSize = PyUnicode_GET_LENGTH (sqlQueryObj );
10651065 sqlQuery = (SQLWCHAR * )malloc ((int )objectSize * sizeof (SQLWCHAR ) + sizeof (SQLWCHAR ));
10661066 if (sqlQuery == NULL )
10671067 {
@@ -1086,7 +1086,7 @@ static PyObject *_python_IfxPy_register_smart_trigger_helper(PyObject *self, PyO
10861086 PyErr_SetString (PyExc_Exception , "Statement must be a string or unicode" );
10871087 return NULL ;
10881088 }
1089- objectSize = PyUnicode_GET_DATA_SIZE (labelObj );
1089+ objectSize = PyUnicode_GET_LENGTH (labelObj );
10901090 label = (SQLWCHAR * )malloc ((int )objectSize * sizeof (SQLWCHAR ) + sizeof (SQLWCHAR ));
10911091 if (label == NULL )
10921092 {
0 commit comments