@@ -29,32 +29,35 @@ close_blob(pysqlite_Blob *self)
2929}
3030
3131static int
32- blob_traverse (pysqlite_Blob * self , visitproc visit , void * arg )
32+ blob_traverse (PyObject * op , visitproc visit , void * arg )
3333{
34+ pysqlite_Blob * self = _pysqlite_Blob_CAST (op );
3435 Py_VISIT (Py_TYPE (self ));
3536 Py_VISIT (self -> connection );
3637 return 0 ;
3738}
3839
3940static int
40- blob_clear (pysqlite_Blob * self )
41+ blob_clear (PyObject * op )
4142{
43+ pysqlite_Blob * self = _pysqlite_Blob_CAST (op );
4244 Py_CLEAR (self -> connection );
4345 return 0 ;
4446}
4547
4648static void
47- blob_dealloc (pysqlite_Blob * self )
49+ blob_dealloc (PyObject * op )
4850{
51+ pysqlite_Blob * self = _pysqlite_Blob_CAST (op );
4952 PyTypeObject * tp = Py_TYPE (self );
5053 PyObject_GC_UnTrack (self );
5154
5255 close_blob (self );
5356
5457 if (self -> in_weakreflist != NULL ) {
55- PyObject_ClearWeakRefs (( PyObject * ) self );
58+ PyObject_ClearWeakRefs (op );
5659 }
57- tp -> tp_clear (( PyObject * ) self );
60+ ( void ) tp -> tp_clear (op );
5861 tp -> tp_free (self );
5962 Py_DECREF (tp );
6063}
@@ -373,8 +376,9 @@ blob_exit_impl(pysqlite_Blob *self, PyObject *type, PyObject *val,
373376}
374377
375378static Py_ssize_t
376- blob_length (pysqlite_Blob * self )
379+ blob_length (PyObject * op )
377380{
381+ pysqlite_Blob * self = _pysqlite_Blob_CAST (op );
378382 if (!check_blob (self )) {
379383 return -1 ;
380384 }
@@ -449,8 +453,9 @@ subscript_slice(pysqlite_Blob *self, PyObject *item)
449453}
450454
451455static PyObject *
452- blob_subscript (pysqlite_Blob * self , PyObject * item )
456+ blob_subscript (PyObject * op , PyObject * item )
453457{
458+ pysqlite_Blob * self = _pysqlite_Blob_CAST (op );
454459 if (!check_blob (self )) {
455460 return NULL ;
456461 }
@@ -546,8 +551,9 @@ ass_subscript_slice(pysqlite_Blob *self, PyObject *item, PyObject *value)
546551}
547552
548553static int
549- blob_ass_subscript (pysqlite_Blob * self , PyObject * item , PyObject * value )
554+ blob_ass_subscript (PyObject * op , PyObject * item , PyObject * value )
550555{
556+ pysqlite_Blob * self = _pysqlite_Blob_CAST (op );
551557 if (!check_blob (self )) {
552558 return -1 ;
553559 }
0 commit comments