Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd5ca15e

Browse files
Add type cast to foreach_internal's loop variable.
C++ requires explicitly casting void pointers to the appropriatepointer type, which means the foreach_ptr macro cannot be used inC++ code without this change.Author: Jelte Fennema-NioReviewed-by: Bruce MomjianDiscussion:https://postgr.es/m/CAGECzQSYG3QfHrc-rOk2KbnB9iJOd7Qu-Xii1s-GTA%3D3JFt49Q%40mail.gmail.comBackpatch-through: 17
1 parent2453196 commitd5ca15e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/include/nodes/pg_list.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ for_each_cell_setup(const List *lst, const ListCell *initcell)
485485
for (ForEachState var##__state = {(lst), 0}; \
486486
(var##__state.l != NIL && \
487487
var##__state.i < var##__state.l->length && \
488-
(var = func(&var##__state.l->elements[var##__state.i]), true)); \
488+
(var =(type pointer)func(&var##__state.l->elements[var##__state.i]), true)); \
489489
var##__state.i++)
490490

491491
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp