Skip to content

Commit f02e6f2

Browse files
committed
fix: update mercure_publish() to use the new GoPackedArray() API
1 parent 11213fd commit f02e6f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mercure.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func go_mercure_publish(threadIndex C.uintptr_t, topics *C.struct__zval_struct,
4646
case C.IS_STRING:
4747
u.Topics = []string{GoString(unsafe.Pointer(*(**C.zend_string)(unsafe.Pointer(&topics.value[0]))))}
4848
case C.IS_ARRAY:
49-
ts, err := GoPackedArray[string](unsafe.Pointer(topics))
49+
ts, err := GoPackedArray[string](unsafe.Pointer(*(**C.zend_array)(unsafe.Pointer(&topics.value[0]))))
5050
if err != nil {
5151
if fc.logger.Enabled(ctx, slog.LevelError) {
5252
fc.logger.LogAttrs(ctx, slog.LevelError, "invalid topics type", slog.Any("error", err))

0 commit comments

Comments
 (0)