Skip to content

Commit 5c2f58c

Browse files
committed
Add explicit arguments to PQfreemem casts to avoid compilation issues when using the C23 standard (Fixes #59)
1 parent 9816b2d commit 5c2f58c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
=== master
2+
3+
* Add explicit arguments to PQfreemem casts to avoid compilation issues when using the C23 standard (jeremyevans) (#59)
4+
15
=== 1.17.1 (2023-01-05)
26

37
* Modify LDFLAGS when building on MacOS to allow undefined functions (delphaber) (#53)

ext/sequel_pg/sequel_pg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ static VALUE spg__array_col_value(char *v, size_t length, VALUE converter, int e
879879
break;
880880
case 17: /* bytea */
881881
bi.blob_string = (char *)PQunescapeBytea((unsigned char*)v, &bi.length);
882-
rv = rb_ensure(spg_create_Blob, (VALUE)&bi, (VALUE(*)())PQfreemem, (VALUE)bi.blob_string);
882+
rv = rb_ensure(spg_create_Blob, (VALUE)&bi, (VALUE(*)(VALUE))PQfreemem, (VALUE)bi.blob_string);
883883
break;
884884
case 20: /* integer */
885885
case 21:
@@ -1031,7 +1031,7 @@ static VALUE spg__col_value(VALUE self, PGresult *res, int i, int j, VALUE* colc
10311031
break;
10321032
case 17: /* bytea */
10331033
bi.blob_string = (char *)PQunescapeBytea((unsigned char*)v, &bi.length);
1034-
rv = rb_ensure(spg_create_Blob, (VALUE)&bi, (VALUE(*)())PQfreemem, (VALUE)bi.blob_string);
1034+
rv = rb_ensure(spg_create_Blob, (VALUE)&bi, (VALUE(*)(VALUE))PQfreemem, (VALUE)bi.blob_string);
10351035
break;
10361036
case 20: /* integer */
10371037
case 21:

0 commit comments

Comments
 (0)