Skip to content

Commit c1eaaaa

Browse files
committed
Merge pull request #13 from stof/fix_tsrm
Fix TSRM definitions
2 parents b2ce301 + ddbe20f commit c1eaaaa

File tree

21 files changed

+67
-67
lines changed

21 files changed

+67
-67
lines changed

ext/php_cassandra.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ PHP_FUNCTION(cassandra_statement_bind)
12931293
if (instanceof_function(Z_OBJCE_P(value), cassandra_ce_Set TSRMLS_CC)) {
12941294
CassCollection* collection;
12951295
cassandra_set* set = (cassandra_set*) zend_object_store_get_object(value TSRMLS_CC);
1296-
if (!php_cassandra_collection_from_set(set, &collection))
1296+
if (!php_cassandra_collection_from_set(set, &collection TSRMLS_CC))
12971297
RETURN_FALSE;
12981298

12991299
CassError rc = cass_statement_bind_collection(statement, (cass_size_t) Z_LVAL_P(index), collection);
@@ -1305,7 +1305,7 @@ PHP_FUNCTION(cassandra_statement_bind)
13051305
if (instanceof_function(Z_OBJCE_P(value), cassandra_ce_Map TSRMLS_CC)) {
13061306
CassCollection* collection;
13071307
cassandra_map* map = (cassandra_map*) zend_object_store_get_object(value TSRMLS_CC);
1308-
if (!php_cassandra_collection_from_map(map, &collection))
1308+
if (!php_cassandra_collection_from_map(map, &collection TSRMLS_CC))
13091309
RETURN_FALSE;
13101310

13111311
CassError rc = cass_statement_bind_collection(statement, (cass_size_t) Z_LVAL_P(index), collection);
@@ -1317,7 +1317,7 @@ PHP_FUNCTION(cassandra_statement_bind)
13171317
if (instanceof_function(Z_OBJCE_P(value), cassandra_ce_Collection TSRMLS_CC)) {
13181318
CassCollection* collection;
13191319
cassandra_collection* coll = (cassandra_collection*) zend_object_store_get_object(value TSRMLS_CC);
1320-
if (!php_cassandra_collection_from_collection(coll, &collection))
1320+
if (!php_cassandra_collection_from_collection(coll, &collection TSRMLS_CC))
13211321
RETURN_FALSE;
13221322

13231323
CassError rc = cass_statement_bind_collection(statement, (cass_size_t) Z_LVAL_P(index), collection);
@@ -1399,7 +1399,7 @@ PHP_FUNCTION(cassandra_statement_bind)
13991399
if (instanceof_function(Z_OBJCE_P(value), cassandra_ce_Set TSRMLS_CC)) {
14001400
CassCollection* collection;
14011401
cassandra_set* set = (cassandra_set*) zend_object_store_get_object(value TSRMLS_CC);
1402-
if (!php_cassandra_collection_from_set(set, &collection))
1402+
if (!php_cassandra_collection_from_set(set, &collection TSRMLS_CC))
14031403
RETURN_FALSE;
14041404

14051405
CassError rc = cass_statement_bind_collection_by_name(statement, Z_STRVAL_P(index), collection);
@@ -1411,7 +1411,7 @@ PHP_FUNCTION(cassandra_statement_bind)
14111411
if (instanceof_function(Z_OBJCE_P(value), cassandra_ce_Map TSRMLS_CC)) {
14121412
CassCollection* collection;
14131413
cassandra_map* map = (cassandra_map*) zend_object_store_get_object(value TSRMLS_CC);
1414-
if (!php_cassandra_collection_from_map(map, &collection))
1414+
if (!php_cassandra_collection_from_map(map, &collection TSRMLS_CC))
14151415
RETURN_FALSE;
14161416

14171417
CassError rc = cass_statement_bind_collection_by_name(statement, Z_STRVAL_P(index), collection);
@@ -1423,7 +1423,7 @@ PHP_FUNCTION(cassandra_statement_bind)
14231423
if (instanceof_function(Z_OBJCE_P(value), cassandra_ce_Collection TSRMLS_CC)) {
14241424
CassCollection* collection;
14251425
cassandra_collection* coll = (cassandra_collection*) zend_object_store_get_object(value TSRMLS_CC);
1426-
if (!php_cassandra_collection_from_collection(coll, &collection))
1426+
if (!php_cassandra_collection_from_collection(coll, &collection TSRMLS_CC))
14271427
RETURN_FALSE;
14281428

14291429
CassError rc = cass_statement_bind_collection_by_name(statement, Z_STRVAL_P(index), collection);

ext/types/bigint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ php_cassandra_bigint_new(zend_class_entry* class_type TSRMLS_DC)
187187
memset(number, 0, sizeof(cassandra_bigint));
188188

189189
zend_object_std_init(&number->zval, class_type TSRMLS_CC);
190-
object_properties_init(&number->zval, class_type TSRMLS_CC);
190+
object_properties_init(&number->zval, class_type);
191191

192192
retval.handle = zend_objects_store_put(number, (zend_objects_store_dtor_t) zend_objects_destroy_object, php_cassandra_bigint_free, NULL TSRMLS_CC);
193193
retval.handlers = &cassandra_bigint_handlers;

ext/types/blob.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ php_cassandra_blob_new(zend_class_entry* class_type TSRMLS_DC)
121121
memset(blob, 0, sizeof(cassandra_blob));
122122

123123
zend_object_std_init(&blob->zval, class_type TSRMLS_CC);
124-
object_properties_init(&blob->zval, class_type TSRMLS_CC);
124+
object_properties_init(&blob->zval, class_type);
125125

126126
retval.handle = zend_objects_store_put(blob, (zend_objects_store_dtor_t) zend_objects_destroy_object, php_cassandra_blob_free, NULL TSRMLS_CC);
127127
retval.handlers = &cassandra_blob_handlers;

ext/types/collection.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ PHP_METHOD(CassandraCollection, __construct)
9797

9898
collection = (cassandra_collection*) zend_object_store_get_object(getThis() TSRMLS_CC);
9999

100-
php_cassandra_value_type(type, &collection->type);
100+
php_cassandra_value_type(type, &collection->type TSRMLS_CC);
101101
}
102102
/* }}} */
103103

@@ -321,7 +321,7 @@ php_cassandra_collection_new(zend_class_entry* class_type TSRMLS_DC)
321321

322322
zend_hash_init(&collection->values, 0, NULL, ZVAL_PTR_DTOR, 0);
323323
zend_object_std_init(&collection->zval, class_type TSRMLS_CC);
324-
object_properties_init(&collection->zval, class_type TSRMLS_CC);
324+
object_properties_init(&collection->zval, class_type);
325325

326326
retval.handle = zend_objects_store_put(collection,
327327
(zend_objects_store_dtor_t) zend_objects_destroy_object,

ext/types/decimal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ PHP_METHOD(CassandraDecimal, __construct)
2020

2121
number = (cassandra_decimal*) zend_object_store_get_object(getThis() TSRMLS_CC);
2222

23-
if (!php_cassandra_parse_decimal(value, value_len, &number->value, &scale))
23+
if (!php_cassandra_parse_decimal(value, value_len, &number->value, &scale TSRMLS_CC))
2424
return;
2525

2626
number->scale = scale;
@@ -140,7 +140,7 @@ php_cassandra_decimal_new(zend_class_entry* class_type TSRMLS_DC)
140140

141141
mpz_init(number->value);
142142
zend_object_std_init(&number->zval, class_type TSRMLS_CC);
143-
object_properties_init(&number->zval, class_type TSRMLS_CC);
143+
object_properties_init(&number->zval, class_type);
144144
number->scale = 0;
145145

146146
retval.handle = zend_objects_store_put(number, (zend_objects_store_dtor_t) zend_objects_destroy_object, php_cassandra_decimal_free, NULL TSRMLS_CC);

ext/types/float.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ php_cassandra_float_new(zend_class_entry* class_type TSRMLS_DC)
132132
memset(number, 0, sizeof(cassandra_float));
133133

134134
zend_object_std_init(&number->zval, class_type TSRMLS_CC);
135-
object_properties_init(&number->zval, class_type TSRMLS_CC);
135+
object_properties_init(&number->zval, class_type);
136136

137137
retval.handle = zend_objects_store_put(number, (zend_objects_store_dtor_t) zend_objects_destroy_object, php_cassandra_float_free, NULL TSRMLS_CC);
138138
retval.handlers = &cassandra_float_handlers;

ext/types/inet.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ PHP_METHOD(CassandraInet, __construct)
1919

2020
inet = (cassandra_inet*) zend_object_store_get_object(getThis() TSRMLS_CC);
2121

22-
if (!php_cassandra_parse_ip_address(address, &inet->inet))
22+
if (!php_cassandra_parse_ip_address(address, &inet->inet TSRMLS_CC))
2323
return;
2424
}
2525
/* }}} */
@@ -117,7 +117,7 @@ php_cassandra_inet_new(zend_class_entry* class_type TSRMLS_DC)
117117
memset(inet, 0, sizeof(cassandra_inet));
118118

119119
zend_object_std_init(&inet->zval, class_type TSRMLS_CC);
120-
object_properties_init(&inet->zval, class_type TSRMLS_CC);
120+
object_properties_init(&inet->zval, class_type);
121121

122122
retval.handle = zend_objects_store_put(inet, (zend_objects_store_dtor_t) zend_objects_destroy_object, php_cassandra_inet_free, NULL TSRMLS_CC);
123123
retval.handlers = &cassandra_inet_handlers;

ext/types/map.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ php_cassandra_map_set(cassandra_map* map, zval* zkey, zval* zvalue TSRMLS_DC)
4444
}
4545

4646
static int
47-
php_cassandra_map_get(cassandra_map* map, zval* zkey, zval** zvalue)
47+
php_cassandra_map_get(cassandra_map* map, zval* zkey, zval** zvalue TSRMLS_DC)
4848
{
4949
char* key;
5050
int key_len;
@@ -66,7 +66,7 @@ php_cassandra_map_get(cassandra_map* map, zval* zkey, zval** zvalue)
6666
}
6767

6868
static int
69-
php_cassandra_map_del(cassandra_map* map, zval* zkey)
69+
php_cassandra_map_del(cassandra_map* map, zval* zkey TSRMLS_DC)
7070
{
7171
char* key;
7272
int key_len;
@@ -87,7 +87,7 @@ php_cassandra_map_del(cassandra_map* map, zval* zkey)
8787
}
8888

8989
static int
90-
php_cassandra_map_has(cassandra_map* map, zval* zkey)
90+
php_cassandra_map_has(cassandra_map* map, zval* zkey TSRMLS_DC)
9191
{
9292
char* key;
9393
int key_len;
@@ -171,9 +171,9 @@ PHP_METHOD(CassandraMap, __construct)
171171

172172
map = (cassandra_map*) zend_object_store_get_object(getThis() TSRMLS_CC);
173173

174-
if (!php_cassandra_value_type(key_type, &map->key_type))
174+
if (!php_cassandra_value_type(key_type, &map->key_type TSRMLS_CC))
175175
return;
176-
php_cassandra_value_type(value_type, &map->value_type);
176+
php_cassandra_value_type(value_type, &map->value_type TSRMLS_CC);
177177
}
178178
/* }}} */
179179

@@ -235,7 +235,7 @@ PHP_METHOD(CassandraMap, get)
235235

236236
cassandra_map* map = (cassandra_map*) zend_object_store_get_object(getThis() TSRMLS_CC);
237237

238-
if (php_cassandra_map_get(map, key, &value))
238+
if (php_cassandra_map_get(map, key, &value TSRMLS_CC))
239239
RETURN_ZVAL(value, 1, 0);
240240
}
241241

@@ -248,7 +248,7 @@ PHP_METHOD(CassandraMap, remove)
248248

249249
cassandra_map* map = (cassandra_map*) zend_object_store_get_object(getThis() TSRMLS_CC);
250250

251-
if (php_cassandra_map_del(map, key))
251+
if (php_cassandra_map_del(map, key TSRMLS_CC))
252252
RETURN_TRUE;
253253

254254
RETURN_FALSE;
@@ -263,7 +263,7 @@ PHP_METHOD(CassandraMap, has)
263263

264264
cassandra_map* map = (cassandra_map*) zend_object_store_get_object(getThis() TSRMLS_CC);
265265

266-
if (php_cassandra_map_has(map, key))
266+
if (php_cassandra_map_has(map, key TSRMLS_CC))
267267
RETURN_TRUE;
268268

269269
RETURN_FALSE;
@@ -336,7 +336,7 @@ PHP_METHOD(CassandraMap, offsetGet)
336336

337337
cassandra_map* map = (cassandra_map*) zend_object_store_get_object(getThis() TSRMLS_CC);
338338

339-
if (php_cassandra_map_get(map, key, &value))
339+
if (php_cassandra_map_get(map, key, &value TSRMLS_CC))
340340
RETURN_ZVAL(value, 1, 0);
341341
}
342342

@@ -349,7 +349,7 @@ PHP_METHOD(CassandraMap, offsetUnset)
349349

350350
cassandra_map* map = (cassandra_map*) zend_object_store_get_object(getThis() TSRMLS_CC);
351351

352-
php_cassandra_map_del(map, key);
352+
php_cassandra_map_del(map, key TSRMLS_CC);
353353
}
354354

355355
PHP_METHOD(CassandraMap, offsetExists)
@@ -361,7 +361,7 @@ PHP_METHOD(CassandraMap, offsetExists)
361361

362362
cassandra_map* map = (cassandra_map*) zend_object_store_get_object(getThis() TSRMLS_CC);
363363

364-
if (php_cassandra_map_has(map, key))
364+
if (php_cassandra_map_has(map, key TSRMLS_CC))
365365
RETURN_TRUE;
366366

367367
RETURN_FALSE;
@@ -478,7 +478,7 @@ php_cassandra_map_new(zend_class_entry* class_type TSRMLS_DC)
478478
zend_hash_init(&map->keys, 0, NULL, ZVAL_PTR_DTOR, 0);
479479
zend_hash_init(&map->values, 0, NULL, ZVAL_PTR_DTOR, 0);
480480
zend_object_std_init(&map->zval, class_type TSRMLS_CC);
481-
object_properties_init(&map->zval, class_type TSRMLS_CC);
481+
object_properties_init(&map->zval, class_type);
482482

483483
retval.handle = zend_objects_store_put(map,
484484
(zend_objects_store_dtor_t) zend_objects_destroy_object,

ext/types/set.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ php_cassandra_set_add(cassandra_set* set, zval* object TSRMLS_DC)
2929
}
3030

3131
static int
32-
php_cassandra_set_del(cassandra_set* set, zval* object)
32+
php_cassandra_set_del(cassandra_set* set, zval* object TSRMLS_DC)
3333
{
3434
char* key;
3535
int key_len;
@@ -46,7 +46,7 @@ php_cassandra_set_del(cassandra_set* set, zval* object)
4646
}
4747

4848
static int
49-
php_cassandra_set_has(cassandra_set* set, zval* object)
49+
php_cassandra_set_has(cassandra_set* set, zval* object TSRMLS_DC)
5050
{
5151
char* key;
5252
int key_len;
@@ -95,7 +95,7 @@ PHP_METHOD(CassandraSet, __construct)
9595

9696
set = (cassandra_set*) zend_object_store_get_object(getThis() TSRMLS_CC);
9797

98-
php_cassandra_value_type(type, &set->type);
98+
php_cassandra_value_type(type, &set->type TSRMLS_CC);
9999
}
100100
/* }}} */
101101

@@ -142,7 +142,7 @@ PHP_METHOD(CassandraSet, remove)
142142

143143
cassandra_set* set = (cassandra_set*) zend_object_store_get_object(getThis() TSRMLS_CC);
144144

145-
if (php_cassandra_set_del(set, object))
145+
if (php_cassandra_set_del(set, object TSRMLS_CC))
146146
RETURN_TRUE;
147147

148148
RETURN_FALSE;
@@ -158,7 +158,7 @@ PHP_METHOD(CassandraSet, has)
158158

159159
cassandra_set* set = (cassandra_set*) zend_object_store_get_object(getThis() TSRMLS_CC);
160160

161-
if (php_cassandra_set_has(set, object))
161+
if (php_cassandra_set_has(set, object TSRMLS_CC))
162162
RETURN_TRUE;
163163

164164
RETURN_FALSE;
@@ -305,7 +305,7 @@ php_cassandra_set_new(zend_class_entry* class_type TSRMLS_DC)
305305

306306
zend_hash_init(&set->values, 0, NULL, ZVAL_PTR_DTOR, 0);
307307
zend_object_std_init(&set->zval, class_type TSRMLS_CC);
308-
object_properties_init(&set->zval, class_type TSRMLS_CC);
308+
object_properties_init(&set->zval, class_type);
309309

310310
retval.handle = zend_objects_store_put(set,
311311
(zend_objects_store_dtor_t) zend_objects_destroy_object,

ext/types/timestamp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ php_cassandra_timestamp_new(zend_class_entry* class_type TSRMLS_DC)
198198
memset(timestamp, 0, sizeof(cassandra_timestamp));
199199

200200
zend_object_std_init(&timestamp->zval, class_type TSRMLS_CC);
201-
object_properties_init(&timestamp->zval, class_type TSRMLS_CC);
201+
object_properties_init(&timestamp->zval, class_type);
202202

203203
retval.handle = zend_objects_store_put(timestamp, (zend_objects_store_dtor_t) zend_objects_destroy_object, php_cassandra_timestamp_free, NULL TSRMLS_CC);
204204
retval.handlers = &cassandra_timestamp_handlers;

0 commit comments

Comments
 (0)