Skip to content

Commit 1ab1886

Browse files
committed
Tmp
1 parent 70c6c8c commit 1ab1886

20 files changed

+84
-77
lines changed

src/BSON/Binary.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static bool php_phongo_binary_init_from_hash(php_phongo_binary_t* intern, HashTa
6363
return false;
6464
}
6565

66-
static HashTable* php_phongo_binary_get_properties_hash(zend_object* object, bool is_temp)
66+
static HashTable* php_phongo_binary_get_properties_hash(zend_object* object)
6767
{
6868
php_phongo_binary_t* intern;
6969
HashTable* props;
@@ -186,7 +186,7 @@ static PHP_METHOD(MongoDB_BSON_Binary, __serialize)
186186
{
187187
PHONGO_PARSE_PARAMETERS_NONE();
188188

189-
RETURN_ARR(php_phongo_binary_get_properties_hash(Z_OBJ_P(getThis()), true));
189+
PHONGO_RETURN_PROPERTIES_ARR(php_phongo_binary_get_properties_hash(Z_OBJ_P(getThis())));
190190
}
191191

192192
static PHP_METHOD(MongoDB_BSON_Binary, __unserialize)
@@ -268,12 +268,12 @@ static int php_phongo_binary_compare_objects(zval* o1, zval* o2)
268268
static HashTable* php_phongo_binary_get_debug_info(zend_object* object, int* is_temp)
269269
{
270270
*is_temp = 0;
271-
return php_phongo_binary_get_properties_hash(object, true);
271+
return php_phongo_binary_get_properties_hash(object);
272272
}
273273

274274
static HashTable* php_phongo_binary_get_properties(zend_object* object)
275275
{
276-
return php_phongo_binary_get_properties_hash(object, false);
276+
return php_phongo_binary_get_properties_hash(object);
277277
}
278278

279279
void php_phongo_binary_init_ce(INIT_FUNC_ARGS)

src/BSON/DBPointer.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static bool php_phongo_dbpointer_init_from_hash(php_phongo_dbpointer_t* intern,
6464
return false;
6565
}
6666

67-
HashTable* php_phongo_dbpointer_get_properties_hash(zend_object* object, bool is_temp)
67+
HashTable* php_phongo_dbpointer_get_properties_hash(zend_object* object)
6868
{
6969
php_phongo_dbpointer_t* intern;
7070
HashTable* props;
@@ -149,7 +149,7 @@ static PHP_METHOD(MongoDB_BSON_DBPointer, __serialize)
149149
{
150150
PHONGO_PARSE_PARAMETERS_NONE();
151151

152-
RETURN_ARR(php_phongo_dbpointer_get_properties_hash(Z_OBJ_P(getThis()), true));
152+
PHONGO_RETURN_PROPERTIES_ARR(php_phongo_dbpointer_get_properties_hash(Z_OBJ_P(getThis())));
153153
}
154154

155155
static PHP_METHOD(MongoDB_BSON_DBPointer, __unserialize)
@@ -228,12 +228,12 @@ static int php_phongo_dbpointer_compare_objects(zval* o1, zval* o2)
228228
static HashTable* php_phongo_dbpointer_get_debug_info(zend_object* object, int* is_temp)
229229
{
230230
*is_temp = 0;
231-
return php_phongo_dbpointer_get_properties_hash(object, true);
231+
return php_phongo_dbpointer_get_properties_hash(object);
232232
}
233233

234234
static HashTable* php_phongo_dbpointer_get_properties(zend_object* object)
235235
{
236-
return php_phongo_dbpointer_get_properties_hash(object, false);
236+
return php_phongo_dbpointer_get_properties_hash(object);
237237
}
238238

239239
void php_phongo_dbpointer_init_ce(INIT_FUNC_ARGS)

src/BSON/Decimal128.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static bool php_phongo_decimal128_init_from_hash(php_phongo_decimal128_t* intern
5353
return false;
5454
}
5555

56-
static HashTable* php_phongo_decimal128_get_properties_hash(zend_object* object, bool is_temp)
56+
static HashTable* php_phongo_decimal128_get_properties_hash(zend_object* object)
5757
{
5858
php_phongo_decimal128_t* intern;
5959
HashTable* props;
@@ -145,7 +145,7 @@ static PHP_METHOD(MongoDB_BSON_Decimal128, __serialize)
145145
{
146146
PHONGO_PARSE_PARAMETERS_NONE();
147147

148-
RETURN_ARR(php_phongo_decimal128_get_properties_hash(Z_OBJ_P(getThis()), true));
148+
PHONGO_RETURN_PROPERTIES_ARR(php_phongo_decimal128_get_properties_hash(Z_OBJ_P(getThis())));
149149
}
150150

151151
static PHP_METHOD(MongoDB_BSON_Decimal128, __unserialize)
@@ -203,12 +203,12 @@ static zend_object* php_phongo_decimal128_clone_object(zend_object* object)
203203
static HashTable* php_phongo_decimal128_get_debug_info(zend_object* object, int* is_temp)
204204
{
205205
*is_temp = 0;
206-
return php_phongo_decimal128_get_properties_hash(object, true);
206+
return php_phongo_decimal128_get_properties_hash(object);
207207
}
208208

209209
static HashTable* php_phongo_decimal128_get_properties(zend_object* object)
210210
{
211-
return php_phongo_decimal128_get_properties_hash(object, false);
211+
return php_phongo_decimal128_get_properties_hash(object);
212212
}
213213

214214
void php_phongo_decimal128_init_ce(INIT_FUNC_ARGS)

src/BSON/Document.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static bool php_phongo_document_init_from_hash(php_phongo_document_t* intern, Ha
5555
return false;
5656
}
5757

58-
static HashTable* php_phongo_document_get_properties_hash(zend_object* object, bool is_temp, int size)
58+
static HashTable* php_phongo_document_get_properties_hash(zend_object* object, int size)
5959
{
6060
php_phongo_document_t* intern;
6161
HashTable* props;
@@ -419,7 +419,7 @@ static PHP_METHOD(MongoDB_BSON_Document, __serialize)
419419
{
420420
PHONGO_PARSE_PARAMETERS_NONE();
421421

422-
RETURN_ARR(php_phongo_document_get_properties_hash(Z_OBJ_P(getThis()), true, 1));
422+
PHONGO_RETURN_PROPERTIES_ARR(php_phongo_document_get_properties_hash(Z_OBJ_P(getThis()), 1));
423423
}
424424

425425
static PHP_METHOD(MongoDB_BSON_Document, __unserialize)
@@ -499,7 +499,7 @@ static HashTable* php_phongo_document_get_debug_info(zend_object* object, int* i
499499
/* This get_debug_info handler reports an additional property. This does not
500500
* conflict with other uses of php_phongo_document_get_properties_hash since
501501
* we always allocated a new HashTable with is_temp=true. */
502-
props = php_phongo_document_get_properties_hash(object, true, 2);
502+
props = php_phongo_document_get_properties_hash(object, 2);
503503

504504
{
505505
php_phongo_bson_state state;
@@ -520,7 +520,7 @@ static HashTable* php_phongo_document_get_debug_info(zend_object* object, int* i
520520

521521
static HashTable* php_phongo_document_get_properties(zend_object* object)
522522
{
523-
return php_phongo_document_get_properties_hash(object, false, 1);
523+
return php_phongo_document_get_properties_hash(object, 1);
524524
}
525525

526526
zval* php_phongo_document_read_property(zend_object* object, zend_string* member, int type, void** cache_slot, zval* rv)

src/BSON/Int64.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static bool php_phongo_int64_init_from_hash(php_phongo_int64_t* intern, HashTabl
6262
return false;
6363
}
6464

65-
HashTable* php_phongo_int64_get_properties_hash(zend_object* object, bool is_temp)
65+
HashTable* php_phongo_int64_get_properties_hash(zend_object* object)
6666
{
6767
php_phongo_int64_t* intern;
6868
HashTable* props;
@@ -152,7 +152,7 @@ static PHP_METHOD(MongoDB_BSON_Int64, __serialize)
152152
{
153153
PHONGO_PARSE_PARAMETERS_NONE();
154154

155-
RETURN_ARR(php_phongo_int64_get_properties_hash(Z_OBJ_P(getThis()), true));
155+
PHONGO_RETURN_PROPERTIES_ARR(php_phongo_int64_get_properties_hash(Z_OBJ_P(getThis())));
156156
}
157157

158158
static PHP_METHOD(MongoDB_BSON_Int64, __unserialize)
@@ -541,12 +541,12 @@ static zend_result php_phongo_int64_do_operation(zend_uchar opcode, zval* result
541541
static HashTable* php_phongo_int64_get_debug_info(zend_object* object, int* is_temp)
542542
{
543543
*is_temp = 0;
544-
return php_phongo_int64_get_properties_hash(object, true);
544+
return php_phongo_int64_get_properties_hash(object);
545545
}
546546

547547
static HashTable* php_phongo_int64_get_properties(zend_object* object)
548548
{
549-
return php_phongo_int64_get_properties_hash(object, false);
549+
return php_phongo_int64_get_properties_hash(object);
550550
}
551551

552552
void php_phongo_int64_init_ce(INIT_FUNC_ARGS)

src/BSON/Iterator.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ static void php_phongo_iterator_rewind(php_phongo_iterator_t* intern)
153153
intern->valid = bson_iter_next(&intern->iter);
154154
}
155155

156-
static HashTable* php_phongo_iterator_get_properties_hash(zend_object* object, bool is_temp)
156+
static HashTable* php_phongo_iterator_get_properties_hash(zend_object* object)
157157
{
158158
php_phongo_iterator_t* intern;
159159
HashTable* props;
@@ -284,12 +284,12 @@ static zend_object* php_phongo_iterator_clone_object(zend_object* object)
284284
static HashTable* php_phongo_iterator_get_debug_info(zend_object* object, int* is_temp)
285285
{
286286
*is_temp = 0;
287-
return php_phongo_iterator_get_properties_hash(object, true);
287+
return php_phongo_iterator_get_properties_hash(object);
288288
}
289289

290290
static HashTable* php_phongo_iterator_get_properties(zend_object* object)
291291
{
292-
return php_phongo_iterator_get_properties_hash(object, false);
292+
return php_phongo_iterator_get_properties_hash(object);
293293
}
294294

295295
/* Iterator handlers */

src/BSON/Javascript.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static bool php_phongo_javascript_init_from_hash(php_phongo_javascript_t* intern
6969
return false;
7070
}
7171

72-
HashTable* php_phongo_javascript_get_properties_hash(zend_object* object, bool is_temp)
72+
HashTable* php_phongo_javascript_get_properties_hash(zend_object* object)
7373
{
7474
php_phongo_javascript_t* intern;
7575
HashTable* props;
@@ -227,7 +227,7 @@ static PHP_METHOD(MongoDB_BSON_Javascript, __serialize)
227227
{
228228
PHONGO_PARSE_PARAMETERS_NONE();
229229

230-
RETURN_ARR(php_phongo_javascript_get_properties_hash(Z_OBJ_P(getThis()), true));
230+
PHONGO_RETURN_PROPERTIES_ARR(php_phongo_javascript_get_properties_hash(Z_OBJ_P(getThis())));
231231
}
232232

233233
static PHP_METHOD(MongoDB_BSON_Javascript, __unserialize)
@@ -305,12 +305,12 @@ static int php_phongo_javascript_compare_objects(zval* o1, zval* o2)
305305
static HashTable* php_phongo_javascript_get_debug_info(zend_object* object, int* is_temp)
306306
{
307307
*is_temp = 0;
308-
return php_phongo_javascript_get_properties_hash(object, true);
308+
return php_phongo_javascript_get_properties_hash(object);
309309
}
310310

311311
static HashTable* php_phongo_javascript_get_properties(zend_object* object)
312312
{
313-
return php_phongo_javascript_get_properties_hash(object, false);
313+
return php_phongo_javascript_get_properties_hash(object);
314314
}
315315

316316
void php_phongo_javascript_init_ce(INIT_FUNC_ARGS)

src/BSON/ObjectId.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static bool php_phongo_objectid_init_from_hash(php_phongo_objectid_t* intern, Ha
7777
return false;
7878
}
7979

80-
static HashTable* php_phongo_objectid_get_properties_hash(zend_object* object, bool is_temp)
80+
static HashTable* php_phongo_objectid_get_properties_hash(zend_object* object)
8181
{
8282
php_phongo_objectid_t* intern;
8383
HashTable* props;
@@ -179,7 +179,7 @@ static PHP_METHOD(MongoDB_BSON_ObjectId, __serialize)
179179
{
180180
PHONGO_PARSE_PARAMETERS_NONE();
181181

182-
RETURN_ARR(php_phongo_objectid_get_properties_hash(Z_OBJ_P(getThis()), true));
182+
PHONGO_RETURN_PROPERTIES_ARR(php_phongo_objectid_get_properties_hash(Z_OBJ_P(getThis())));
183183
}
184184

185185
static PHP_METHOD(MongoDB_BSON_ObjectId, __unserialize)
@@ -250,12 +250,12 @@ static int php_phongo_objectid_compare_objects(zval* o1, zval* o2)
250250
static HashTable* php_phongo_objectid_get_debug_info(zend_object* object, int* is_temp)
251251
{
252252
*is_temp = 0;
253-
return php_phongo_objectid_get_properties_hash(object, true);
253+
return php_phongo_objectid_get_properties_hash(object);
254254
}
255255

256256
static HashTable* php_phongo_objectid_get_properties(zend_object* object)
257257
{
258-
return php_phongo_objectid_get_properties_hash(object, false);
258+
return php_phongo_objectid_get_properties_hash(object);
259259
}
260260

261261
void php_phongo_objectid_init_ce(INIT_FUNC_ARGS)

src/BSON/PackedArray.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static bool php_phongo_packedarray_init_from_hash(php_phongo_packedarray_t* inte
5656
return false;
5757
}
5858

59-
static HashTable* php_phongo_packedarray_get_properties_hash(zend_object* object, bool is_temp, int size)
59+
static HashTable* php_phongo_packedarray_get_properties_hash(zend_object* object, int size)
6060
{
6161
php_phongo_packedarray_t* intern;
6262
HashTable* props;
@@ -403,7 +403,7 @@ static PHP_METHOD(MongoDB_BSON_PackedArray, __serialize)
403403
{
404404
PHONGO_PARSE_PARAMETERS_NONE();
405405

406-
RETURN_ARR(php_phongo_packedarray_get_properties_hash(Z_OBJ_P(getThis()), true, 1));
406+
PHONGO_RETURN_PROPERTIES_ARR(php_phongo_packedarray_get_properties_hash(Z_OBJ_P(getThis()), 1));
407407
}
408408

409409
static PHP_METHOD(MongoDB_BSON_PackedArray, __unserialize)
@@ -483,7 +483,7 @@ static HashTable* php_phongo_packedarray_get_debug_info(zend_object* object, int
483483
/* This get_debug_info handler reports an additional property. This does not
484484
* conflict with other uses of php_phongo_document_get_properties_hash since
485485
* we always allocated a new HashTable with is_temp=true. */
486-
props = php_phongo_packedarray_get_properties_hash(object, true, 2);
486+
props = php_phongo_packedarray_get_properties_hash(object, 2);
487487

488488
{
489489
php_phongo_bson_state state;
@@ -505,7 +505,7 @@ static HashTable* php_phongo_packedarray_get_debug_info(zend_object* object, int
505505

506506
static HashTable* php_phongo_packedarray_get_properties(zend_object* object)
507507
{
508-
return php_phongo_packedarray_get_properties_hash(object, false, 1);
508+
return php_phongo_packedarray_get_properties_hash(object, 1);
509509
}
510510

511511
zval* php_phongo_packedarray_read_dimension(zend_object* object, zval* offset, int type, zval* rv)

src/BSON/Regex.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static bool php_phongo_regex_init_from_hash(php_phongo_regex_t* intern, HashTabl
7878
return false;
7979
}
8080

81-
static HashTable* php_phongo_regex_get_properties_hash(zend_object* object, bool is_temp)
81+
static HashTable* php_phongo_regex_get_properties_hash(zend_object* object)
8282
{
8383
php_phongo_regex_t* intern;
8484
HashTable* props;
@@ -197,7 +197,7 @@ static PHP_METHOD(MongoDB_BSON_Regex, __serialize)
197197
{
198198
PHONGO_PARSE_PARAMETERS_NONE();
199199

200-
RETURN_ARR(php_phongo_regex_get_properties_hash(Z_OBJ_P(getThis()), true));
200+
PHONGO_RETURN_PROPERTIES_ARR(php_phongo_regex_get_properties_hash(Z_OBJ_P(getThis())));
201201
}
202202

203203
static PHP_METHOD(MongoDB_BSON_Regex, __unserialize)
@@ -281,12 +281,12 @@ static int php_phongo_regex_compare_objects(zval* o1, zval* o2)
281281
static HashTable* php_phongo_regex_get_debug_info(zend_object* object, int* is_temp)
282282
{
283283
*is_temp = 0;
284-
return php_phongo_regex_get_properties_hash(object, true);
284+
return php_phongo_regex_get_properties_hash(object);
285285
}
286286

287287
static HashTable* php_phongo_regex_get_properties(zend_object* object)
288288
{
289-
return php_phongo_regex_get_properties_hash(object, false);
289+
return php_phongo_regex_get_properties_hash(object);
290290
}
291291

292292
void php_phongo_regex_init_ce(INIT_FUNC_ARGS)

0 commit comments

Comments
 (0)