Convert resources to objects in ext/pgsql#6791
Convert resources to objects in ext/pgsql#6791kocsismate wants to merge 14 commits intophp:masterfrom
Conversation
777ebcf to
1c1b974
Compare
ext/pgsql/pgsql.c
Outdated
| #define pg_encoding_to_char(x) "SQL_ASCII" | ||
| #endif | ||
|
|
||
| /* {{{ _php_pgsql_trim_message */ |
There was a problem hiding this comment.
I removed some of these unnecessary comments because they annoyed me at some point
There was a problem hiding this comment.
This does make a lot of noise in the PR sadly :-/
There was a problem hiding this comment.
I agree that it was not a good idea to do this here. I can get rid of these changes If they make code review difficult
There was a problem hiding this comment.
Feel free to simply separately land a removal of all folder marks in pgsql (though I don't mind it being part of this change).
There was a problem hiding this comment.
I'll do it separately!
1c1b974 to
5b34373
Compare
Girgias
left a comment
There was a problem hiding this comment.
Looks OK from a quick glance if persistent connections still work (as currently there is no plan nor deprecation getting rid of those)
|
9c9bb86 to
45f55f7
Compare
|
Now only ~12 tests fail and I also tried to implement the suggestionss in in c7a86a3 (notices doesn't yet work perfectly). |
45f55f7 to
6a929c9
Compare
|
My latest commit (6931655) fixes all tests, finally! |
6931655 to
eb22b17
Compare
dbf23ba to
98c2c0d
Compare
ext/pgsql/pgsql.c
Outdated
| #define pg_encoding_to_char(x) "SQL_ASCII" | ||
| #endif | ||
|
|
||
| /* {{{ _php_pgsql_trim_message */ |
There was a problem hiding this comment.
Feel free to simply separately land a removal of all folder marks in pgsql (though I don't mind it being part of this change).
98c2c0d to
c05c20b
Compare
|
I addressed most of the review comments, however, currently many tests end up with a memory leak. The issue is with the default connection handling, so I'll continue chasing this problem. |
|
I pushed a few changes that should fix the leaks. |
|
Windows build failed with: Not really obvious to me why ... |
| } | ||
|
|
||
| if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) { | ||
| zend_argument_type_error(1, "must be of type PgSql when the connection is provided"); |
There was a problem hiding this comment.
| zend_argument_type_error(1, "must be of type PgSql when the connection is provided"); | |
| zend_argument_type_error(1, "must be of type PgSql\\Connection when the connection is provided"); |
The idea came up in php@c7a86a3
The idea came up in php@c7a86a3
4acde1a to
d735e83
Compare
|
I had to force push because of a conflict in the readme, but only the last commit is new. |
| } | ||
|
|
||
| if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) { | ||
| zend_argument_type_error(1, "must be of type PgSql when the connection is provided"); |
Did it when applying the commit! |
No description provided.