File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1123,14 +1123,14 @@ def flush_callback(ctx):
11231123 self ._write_cb = WriteCallback (write_callback )
11241124 self ._flush_cb = FlushCallback (flush_callback )
11251125
1126- # Create a ( placeholder) context we don't actually use the context,
1126+ # Create a placeholder context as we don't actually use the context,
11271127 # but we need having a valid context pointer. Therefore, we create
11281128 # a small buffer and cast it to a StreamContext pointer
1129- self ._placeholder_context = ctypes .create_string_buffer (1 )
1129+ self ._context = ctypes .create_string_buffer (1 )
11301130
11311131 # Create the stream
11321132 self ._stream = _lib .c2pa_create_stream (
1133- ctypes .cast (self ._placeholder_context , ctypes .POINTER (StreamContext )), # context
1133+ ctypes .cast (self ._context , ctypes .POINTER (StreamContext )),
11341134 self ._read_cb ,
11351135 self ._seek_cb ,
11361136 self ._write_cb ,
@@ -1205,7 +1205,6 @@ def close(self):
12051205 finally :
12061206 self ._stream = None
12071207
1208-
12091208 # Clean up callbacks
12101209 for attr in ['_read_cb' , '_seek_cb' , '_write_cb' , '_flush_cb' ]:
12111210 if hasattr (self , attr ):
You can’t perform that action at this time.
0 commit comments