Skip to content

Commit a077e80

Browse files
committed
Use PG_MODULE_MAGIC_EXT where available, closes #196
1 parent fbea6fe commit a077e80

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

META.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "http",
33
"abstract": "HTTP client for PostgreSQL",
44
"description": "HTTP allows you to get the content of a web page in a SQL function call.",
5-
"version": "1.7.0",
5+
"version": "1.7.1",
66
"maintainer": [
77
"Paul Ramsey <[email protected]>"
88
],
@@ -23,7 +23,7 @@
2323
"http": {
2424
"file": "http--1.7.sql",
2525
"docfile": "README.md",
26-
"version": "1.7.0",
26+
"version": "1.7.1",
2727
"abstract": "HTTP client for PostgreSQL"
2828
}
2929
},

http.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,14 @@
8989
#include <curl/curl.h>
9090

9191
/* Set up PgSQL */
92+
#ifdef PG_MODULE_MAGIC_EXT
93+
PG_MODULE_MAGIC_EXT(
94+
.name = "http",
95+
.version = HTTP_VERSION
96+
);
97+
#else
9298
PG_MODULE_MAGIC;
99+
#endif
93100

94101
/* HTTP request methods we support */
95102
typedef enum {

0 commit comments

Comments
 (0)