Skip to content

Commit 2261c87

Browse files
bjoriderickr
authored andcommitted
PHPC-380: Use the compatability macros to get the object
1 parent 3c024a9 commit 2261c87

File tree

12 files changed

+12
-12
lines changed

12 files changed

+12
-12
lines changed

src/MongoDB/BulkWrite.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ static zend_function_entry php_phongo_bulkwrite_me[] = {
272272
/* {{{ php_phongo_bulkwrite_t object handlers */
273273
static void php_phongo_bulkwrite_free_object(phongo_free_object_arg *object TSRMLS_DC) /* {{{ */
274274
{
275-
php_phongo_bulkwrite_t *intern = (php_phongo_bulkwrite_t*)object;
275+
php_phongo_bulkwrite_t *intern = Z_OBJ_BULKWRITE(object);
276276

277277
zend_object_std_dtor(&intern->std TSRMLS_CC);
278278

src/MongoDB/Command.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static zend_function_entry php_phongo_command_me[] = {
9494
/* {{{ php_phongo_command_t object handlers */
9595
static void php_phongo_command_free_object(phongo_free_object_arg *object TSRMLS_DC) /* {{{ */
9696
{
97-
php_phongo_command_t *intern = (php_phongo_command_t*)object;
97+
php_phongo_command_t *intern = Z_OBJ_COMMAND(object);
9898

9999
zend_object_std_dtor(&intern->std TSRMLS_CC);
100100

src/MongoDB/Cursor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ static zend_function_entry php_phongo_cursor_me[] = {
216216
/* {{{ php_phongo_cursor_t object handlers */
217217
static void php_phongo_cursor_free_object(phongo_free_object_arg *object TSRMLS_DC) /* {{{ */
218218
{
219-
php_phongo_cursor_t *intern = (php_phongo_cursor_t*)object;
219+
php_phongo_cursor_t *intern = Z_OBJ_CURSOR(object);
220220

221221
zend_object_std_dtor(&intern->std TSRMLS_CC);
222222

src/MongoDB/CursorId.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static zend_function_entry php_phongo_cursorid_me[] = {
8484
/* {{{ php_phongo_cursorid_t object handlers */
8585
static void php_phongo_cursorid_free_object(phongo_free_object_arg *object TSRMLS_DC) /* {{{ */
8686
{
87-
php_phongo_cursorid_t *intern = (php_phongo_cursorid_t*)object;
87+
php_phongo_cursorid_t *intern = Z_OBJ_CURSORID(object);
8888

8989
zend_object_std_dtor(&intern->std TSRMLS_CC);
9090

src/MongoDB/Manager.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ static zend_function_entry php_phongo_manager_me[] = {
375375
/* {{{ php_phongo_manager_t object handlers */
376376
static void php_phongo_manager_free_object(phongo_free_object_arg *object TSRMLS_DC) /* {{{ */
377377
{
378-
php_phongo_manager_t *intern = (php_phongo_manager_t*)object;
378+
php_phongo_manager_t *intern = Z_OBJ_MANAGER(object);
379379

380380
zend_object_std_dtor(&intern->std TSRMLS_CC);
381381

src/MongoDB/Query.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static zend_function_entry php_phongo_query_me[] = {
123123
/* {{{ php_phongo_query_t object handlers */
124124
static void php_phongo_query_free_object(phongo_free_object_arg *object TSRMLS_DC) /* {{{ */
125125
{
126-
php_phongo_query_t *intern = (php_phongo_query_t*)object;
126+
php_phongo_query_t *intern = Z_OBJ_QUERY(object);
127127

128128
zend_object_std_dtor(&intern->std TSRMLS_CC);
129129

src/MongoDB/ReadPreference.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static zend_function_entry php_phongo_readpreference_me[] = {
169169
/* {{{ php_phongo_readpreference_t object handlers */
170170
static void php_phongo_readpreference_free_object(phongo_free_object_arg *object TSRMLS_DC) /* {{{ */
171171
{
172-
php_phongo_readpreference_t *intern = (php_phongo_readpreference_t*)object;
172+
php_phongo_readpreference_t *intern = Z_OBJ_READPREFERENCE(object);
173173

174174
zend_object_std_dtor(&intern->std TSRMLS_CC);
175175

src/MongoDB/Server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ static int php_phongo_server_compare_objects(zval *o1, zval *o2 TSRMLS_DC) /* {{
509509
/* {{{ php_phongo_server_t object handlers */
510510
static void php_phongo_server_free_object(phongo_free_object_arg *object TSRMLS_DC) /* {{{ */
511511
{
512-
php_phongo_server_t *intern = (php_phongo_server_t*)object;
512+
php_phongo_server_t *intern = Z_OBJ_SERVER(object);
513513

514514
zend_object_std_dtor(&intern->std TSRMLS_CC);
515515

src/MongoDB/WriteConcern.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ static zend_function_entry php_phongo_writeconcern_me[] = {
208208
/* {{{ php_phongo_writeconcern_t object handlers */
209209
static void php_phongo_writeconcern_free_object(phongo_free_object_arg *object TSRMLS_DC) /* {{{ */
210210
{
211-
php_phongo_writeconcern_t *intern = (php_phongo_writeconcern_t*)object;
211+
php_phongo_writeconcern_t *intern = Z_OBJ_WRITECONCERN(object);
212212

213213
zend_object_std_dtor(&intern->std TSRMLS_CC);
214214

src/MongoDB/WriteConcernError.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static zend_function_entry php_phongo_writeconcernerror_me[] = {
129129
/* {{{ php_phongo_writeconcernerror_t object handlers */
130130
static void php_phongo_writeconcernerror_free_object(phongo_free_object_arg *object TSRMLS_DC) /* {{{ */
131131
{
132-
php_phongo_writeconcernerror_t *intern = (php_phongo_writeconcernerror_t*)object;
132+
php_phongo_writeconcernerror_t *intern = Z_OBJ_WRITECONCERNERROR(object);
133133

134134
zend_object_std_dtor(&intern->std TSRMLS_CC);
135135

0 commit comments

Comments
 (0)