Skip to content

Commit 60c0bac

Browse files
committed
fix: Renamings
1 parent 4979476 commit 60c0bac

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/c2pa/c2pa.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,13 +1123,14 @@ def flush_callback(ctx):
11231123
self._write_cb = WriteCallback(write_callback)
11241124
self._flush_cb = FlushCallback(flush_callback)
11251125

1126-
# Create a dummy context since Python callbacks don't use it
1127-
# We create a small buffer and cast it to a StreamContext pointer
1128-
self._dummy_context = ctypes.create_string_buffer(1) # Create a 1-byte buffer
1129-
1126+
# Create a (placeholder) context we don't actually use the context,
1127+
# but we need having a valid context pointer. Therefore, we create
1128+
# a small buffer and cast it to a StreamContext pointer
1129+
self._placeholder_context = ctypes.create_string_buffer(1)
1130+
11301131
# Create the stream
11311132
self._stream = _lib.c2pa_create_stream(
1132-
ctypes.cast(self._dummy_context, ctypes.POINTER(StreamContext)), # context
1133+
ctypes.cast(self._placeholder_context, ctypes.POINTER(StreamContext)), # context
11331134
self._read_cb,
11341135
self._seek_cb,
11351136
self._write_cb,

0 commit comments

Comments
 (0)