Skip to content

Commit 3e4e6f7

Browse files
committed
Delete unused constants
These constants were added by 6ed1819 but they are not used anymore. They are undocumented which is why I've stumbled upon this.
1 parent f39c07a commit 3e4e6f7

File tree

4 files changed

+0
-58
lines changed

4 files changed

+0
-58
lines changed

ext/pdo_pgsql/pdo_pgsql.c

-5
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,6 @@ PHP_METHOD(Pdo_Pgsql, setNoticeCallback)
179179
PHP_MINIT_FUNCTION(pdo_pgsql)
180180
{
181181
REGISTER_PDO_CLASS_CONST_LONG("PGSQL_ATTR_DISABLE_PREPARES", PDO_PGSQL_ATTR_DISABLE_PREPARES);
182-
REGISTER_PDO_CLASS_CONST_LONG("PGSQL_TRANSACTION_IDLE", (zend_long)PGSQL_TRANSACTION_IDLE);
183-
REGISTER_PDO_CLASS_CONST_LONG("PGSQL_TRANSACTION_ACTIVE", (zend_long)PGSQL_TRANSACTION_ACTIVE);
184-
REGISTER_PDO_CLASS_CONST_LONG("PGSQL_TRANSACTION_INTRANS", (zend_long)PGSQL_TRANSACTION_INTRANS);
185-
REGISTER_PDO_CLASS_CONST_LONG("PGSQL_TRANSACTION_INERROR", (zend_long)PGSQL_TRANSACTION_INERROR);
186-
REGISTER_PDO_CLASS_CONST_LONG("PGSQL_TRANSACTION_UNKNOWN", (zend_long)PGSQL_TRANSACTION_UNKNOWN);
187182

188183
PdoPgsql_ce = register_class_Pdo_Pgsql(pdo_dbh_ce);
189184
PdoPgsql_ce->create_object = pdo_dbh_new;

ext/pdo_pgsql/pdo_pgsql.stub.php

-15
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,6 @@ class Pgsql extends \PDO
1818
public const int ATTR_RESULT_MEMORY_SIZE = UNKNOWN;
1919
#endif
2020

21-
/** @cvalue PGSQL_TRANSACTION_IDLE */
22-
public const int TRANSACTION_IDLE = UNKNOWN;
23-
24-
/** @cvalue PGSQL_TRANSACTION_ACTIVE */
25-
public const int TRANSACTION_ACTIVE = UNKNOWN;
26-
27-
/** @cvalue PGSQL_TRANSACTION_INTRANS */
28-
public const int TRANSACTION_INTRANS = UNKNOWN;
29-
30-
/** @cvalue PGSQL_TRANSACTION_INERROR */
31-
public const int TRANSACTION_INERROR = UNKNOWN;
32-
33-
/** @cvalue PGSQL_TRANSACTION_UNKNOWN */
34-
public const int TRANSACTION_UNKNOWN = UNKNOWN;
35-
3621
public function escapeIdentifier(string $input): string {}
3722

3823
public function copyFromArray(string $tableName, array $rows, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null): bool {}

ext/pdo_pgsql/pdo_pgsql_arginfo.h

-30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/pdo_pgsql/php_pdo_pgsql_int.h

-8
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,6 @@ struct pdo_pgsql_lob_self {
104104
Oid oid;
105105
};
106106

107-
enum pdo_pgsql_specific_constants {
108-
PGSQL_TRANSACTION_IDLE = PQTRANS_IDLE,
109-
PGSQL_TRANSACTION_ACTIVE = PQTRANS_ACTIVE,
110-
PGSQL_TRANSACTION_INTRANS = PQTRANS_INTRANS,
111-
PGSQL_TRANSACTION_INERROR = PQTRANS_INERROR,
112-
PGSQL_TRANSACTION_UNKNOWN = PQTRANS_UNKNOWN
113-
};
114-
115107
php_stream *pdo_pgsql_create_lob_stream(zend_object *pdh, int lfd, Oid oid);
116108
extern const php_stream_ops pdo_pgsql_lob_stream_ops;
117109

0 commit comments

Comments
 (0)