@@ -189,6 +189,70 @@ static void php_extname_init_globals(zend_couchbase_globals *couchbase_globals)
189
189
couchbase_globals -> pool_max_idle_time = 60 ;
190
190
}
191
191
192
+ PHP_MINIT_FUNCTION (Result );
193
+ PHP_MINIT_FUNCTION (CouchbasePool );
194
+ PHP_MINIT_FUNCTION (CouchbaseException );
195
+ PHP_MINIT_FUNCTION (Collection );
196
+ PHP_MINIT_FUNCTION (Cluster );
197
+ PHP_MINIT_FUNCTION (ClusterManager );
198
+ PHP_MINIT_FUNCTION (UserSettings );
199
+ PHP_MINIT_FUNCTION (Bucket );
200
+ PHP_MINIT_FUNCTION (BucketManager );
201
+ PHP_MINIT_FUNCTION (Authenticator );
202
+ PHP_MINIT_FUNCTION (CertAuthenticator );
203
+ PHP_MINIT_FUNCTION (ClassicAuthenticator );
204
+ PHP_MINIT_FUNCTION (PasswordAuthenticator );
205
+ PHP_MINIT_FUNCTION (MutationToken );
206
+ PHP_MINIT_FUNCTION (MutationState );
207
+ PHP_MINIT_FUNCTION (AnalyticsQuery );
208
+ PHP_MINIT_FUNCTION (N1qlQuery );
209
+ PHP_MINIT_FUNCTION (N1qlIndex );
210
+ PHP_MINIT_FUNCTION (LookupInSpec );
211
+ PHP_MINIT_FUNCTION (MutateInSpec );
212
+ PHP_MINIT_FUNCTION (SearchQuery );
213
+ PHP_MINIT_FUNCTION (SearchQueryPart );
214
+ PHP_MINIT_FUNCTION (BooleanFieldSearchQuery );
215
+ PHP_MINIT_FUNCTION (BooleanSearchQuery );
216
+ PHP_MINIT_FUNCTION (ConjunctionSearchQuery );
217
+ PHP_MINIT_FUNCTION (DateRangeSearchQuery );
218
+ PHP_MINIT_FUNCTION (DisjunctionSearchQuery );
219
+ PHP_MINIT_FUNCTION (DocIdSearchQuery );
220
+ PHP_MINIT_FUNCTION (GeoBoundingBoxSearchQuery );
221
+ PHP_MINIT_FUNCTION (GeoDistanceSearchQuery );
222
+ PHP_MINIT_FUNCTION (MatchAllSearchQuery );
223
+ PHP_MINIT_FUNCTION (MatchNoneSearchQuery );
224
+ PHP_MINIT_FUNCTION (MatchPhraseSearchQuery );
225
+ PHP_MINIT_FUNCTION (MatchSearchQuery );
226
+ PHP_MINIT_FUNCTION (NumericRangeSearchQuery );
227
+ PHP_MINIT_FUNCTION (PhraseSearchQuery );
228
+ PHP_MINIT_FUNCTION (PrefixSearchQuery );
229
+ PHP_MINIT_FUNCTION (QueryStringSearchQuery );
230
+ PHP_MINIT_FUNCTION (RegexpSearchQuery );
231
+ PHP_MINIT_FUNCTION (TermSearchQuery );
232
+ PHP_MINIT_FUNCTION (TermRangeSearchQuery );
233
+ PHP_MINIT_FUNCTION (WildcardSearchQuery );
234
+ PHP_MINIT_FUNCTION (SearchFacet );
235
+ PHP_MINIT_FUNCTION (TermSearchFacet );
236
+ PHP_MINIT_FUNCTION (DateRangeSearchFacet );
237
+ PHP_MINIT_FUNCTION (NumericRangeSearchFacet );
238
+ PHP_MINIT_FUNCTION (SearchSort );
239
+ PHP_MINIT_FUNCTION (SearchSortField );
240
+ PHP_MINIT_FUNCTION (SearchSortGeoDistance );
241
+ PHP_MINIT_FUNCTION (SearchSortId );
242
+ PHP_MINIT_FUNCTION (SearchSortScore );
243
+ PHP_MINIT_FUNCTION (CryptoProvider );
244
+ PHP_MINIT_FUNCTION (SearchIndexManager );
245
+ PHP_MINIT_FUNCTION (CollectionGet );
246
+ PHP_MINIT_FUNCTION (CollectionGetReplica );
247
+ PHP_MINIT_FUNCTION (CollectionExists );
248
+ PHP_MINIT_FUNCTION (CollectionUnlock );
249
+ PHP_MINIT_FUNCTION (CollectionStore );
250
+ PHP_MINIT_FUNCTION (CollectionTouch );
251
+ PHP_MINIT_FUNCTION (CollectionCounter );
252
+ PHP_MINIT_FUNCTION (CollectionRemove );
253
+ PHP_MINIT_FUNCTION (CollectionSubdoc );
254
+
255
+
192
256
PHP_MINIT_FUNCTION (couchbase )
193
257
{
194
258
ZEND_INIT_MODULE_GLOBALS (couchbase , php_extname_init_globals , NULL );
@@ -203,12 +267,12 @@ PHP_MINIT_FUNCTION(couchbase)
203
267
return FAILURE ;
204
268
}
205
269
}
270
+ PHP_MINIT (Result )(INIT_FUNC_ARGS_PASSTHRU );
206
271
207
272
PHP_MINIT (CouchbasePool )(INIT_FUNC_ARGS_PASSTHRU );
208
273
PHP_MINIT (CouchbaseException )(INIT_FUNC_ARGS_PASSTHRU );
209
- PHP_MINIT (Document )(INIT_FUNC_ARGS_PASSTHRU );
210
- PHP_MINIT (DocumentFragment )(INIT_FUNC_ARGS_PASSTHRU );
211
274
PHP_MINIT (Cluster )(INIT_FUNC_ARGS_PASSTHRU );
275
+ PHP_MINIT (Collection )(INIT_FUNC_ARGS_PASSTHRU );
212
276
PHP_MINIT (ClusterManager )(INIT_FUNC_ARGS_PASSTHRU );
213
277
PHP_MINIT (UserSettings )(INIT_FUNC_ARGS_PASSTHRU );
214
278
PHP_MINIT (Bucket )(INIT_FUNC_ARGS_PASSTHRU );
@@ -219,14 +283,11 @@ PHP_MINIT_FUNCTION(couchbase)
219
283
PHP_MINIT (PasswordAuthenticator )(INIT_FUNC_ARGS_PASSTHRU );
220
284
PHP_MINIT (MutationToken )(INIT_FUNC_ARGS_PASSTHRU );
221
285
PHP_MINIT (MutationState )(INIT_FUNC_ARGS_PASSTHRU );
222
- PHP_MINIT (ViewQueryEncodable )(INIT_FUNC_ARGS_PASSTHRU );
223
- PHP_MINIT (ViewQuery )(INIT_FUNC_ARGS_PASSTHRU );
224
- PHP_MINIT (SpatialViewQuery )(INIT_FUNC_ARGS_PASSTHRU );
225
286
PHP_MINIT (AnalyticsQuery )(INIT_FUNC_ARGS_PASSTHRU );
226
287
PHP_MINIT (N1qlQuery )(INIT_FUNC_ARGS_PASSTHRU );
227
288
PHP_MINIT (N1qlIndex )(INIT_FUNC_ARGS_PASSTHRU );
228
- PHP_MINIT (LookupInBuilder )(INIT_FUNC_ARGS_PASSTHRU );
229
- PHP_MINIT (MutateInBuilder )(INIT_FUNC_ARGS_PASSTHRU );
289
+ PHP_MINIT (LookupInSpec )(INIT_FUNC_ARGS_PASSTHRU );
290
+ PHP_MINIT (MutateInSpec )(INIT_FUNC_ARGS_PASSTHRU );
230
291
PHP_MINIT (SearchQuery )(INIT_FUNC_ARGS_PASSTHRU );
231
292
PHP_MINIT (SearchQueryPart )(INIT_FUNC_ARGS_PASSTHRU );
232
293
PHP_MINIT (BooleanFieldSearchQuery )(INIT_FUNC_ARGS_PASSTHRU );
@@ -258,8 +319,17 @@ PHP_MINIT_FUNCTION(couchbase)
258
319
PHP_MINIT (SearchSortGeoDistance )(INIT_FUNC_ARGS_PASSTHRU );
259
320
PHP_MINIT (SearchSortId )(INIT_FUNC_ARGS_PASSTHRU );
260
321
PHP_MINIT (SearchSortScore )(INIT_FUNC_ARGS_PASSTHRU );
261
- PHP_MINIT (CryptoProvider )(INIT_FUNC_ARGS_PASSTHRU );
322
+ // PHP_MINIT(CryptoProvider)(INIT_FUNC_ARGS_PASSTHRU);
262
323
PHP_MINIT (SearchIndexManager )(INIT_FUNC_ARGS_PASSTHRU );
324
+ PHP_MINIT (CollectionGet )(INIT_FUNC_ARGS_PASSTHRU );
325
+ PHP_MINIT (CollectionGetReplica )(INIT_FUNC_ARGS_PASSTHRU );
326
+ PHP_MINIT (CollectionExists )(INIT_FUNC_ARGS_PASSTHRU );
327
+ PHP_MINIT (CollectionUnlock )(INIT_FUNC_ARGS_PASSTHRU );
328
+ PHP_MINIT (CollectionStore )(INIT_FUNC_ARGS_PASSTHRU );
329
+ PHP_MINIT (CollectionTouch )(INIT_FUNC_ARGS_PASSTHRU );
330
+ PHP_MINIT (CollectionCounter )(INIT_FUNC_ARGS_PASSTHRU );
331
+ PHP_MINIT (CollectionRemove )(INIT_FUNC_ARGS_PASSTHRU );
332
+ PHP_MINIT (CollectionSubdoc )(INIT_FUNC_ARGS_PASSTHRU );
263
333
264
334
PCBC_REGISTER_CONST (PERSISTTO_MASTER );
265
335
PCBC_REGISTER_CONST (PERSISTTO_ONE );
@@ -269,18 +339,6 @@ PHP_MINIT_FUNCTION(couchbase)
269
339
PCBC_REGISTER_CONST (REPLICATETO_TWO );
270
340
PCBC_REGISTER_CONST (REPLICATETO_THREE );
271
341
272
- PCBC_REGISTER_LCBCONST (SDCMD_GET );
273
- PCBC_REGISTER_LCBCONST (SDCMD_REPLACE );
274
- PCBC_REGISTER_LCBCONST (SDCMD_EXISTS );
275
- PCBC_REGISTER_LCBCONST (SDCMD_DICT_ADD );
276
- PCBC_REGISTER_LCBCONST (SDCMD_DICT_UPSERT );
277
- PCBC_REGISTER_LCBCONST (SDCMD_ARRAY_ADD_FIRST );
278
- PCBC_REGISTER_LCBCONST (SDCMD_ARRAY_ADD_LAST );
279
- PCBC_REGISTER_LCBCONST (SDCMD_ARRAY_INSERT );
280
- PCBC_REGISTER_LCBCONST (SDCMD_ARRAY_ADD_UNIQUE );
281
- PCBC_REGISTER_LCBCONST (SDCMD_COUNTER );
282
- PCBC_REGISTER_LCBCONST (SDCMD_REMOVE );
283
-
284
342
PCBC_REGISTER_LCBCONST (CNTL_OP_TIMEOUT );
285
343
PCBC_REGISTER_LCBCONST (CNTL_VIEW_TIMEOUT );
286
344
PCBC_REGISTER_LCBCONST (CNTL_DURABILITY_INTERVAL );
@@ -598,7 +656,7 @@ static void basic_encoder_v1(zval *value, int sertype, int cmprtype, long cmprth
598
656
add_index_zval (return_value , 2 , & dtype );
599
657
}
600
658
601
- static void basic_decoder_v1 (char * bytes , int bytes_len , unsigned long flags , unsigned long datatype ,
659
+ static void basic_decoder_v1 (char * bytes , size_t bytes_len , unsigned long flags , unsigned long datatype ,
602
660
zend_bool jsonassoc , zval * return_value TSRMLS_DC )
603
661
{
604
662
zval res ;
@@ -654,7 +712,7 @@ static void basic_decoder_v1(char *bytes, int bytes_len, unsigned long flags, un
654
712
} else if (cmprtype == COUCHBASE_COMPRESSION_FASTLZ ) {
655
713
unsigned long output_size = * (uint32_t * )bytes ;
656
714
char * output = emalloc (output_size );
657
- output_size = fastlz_decompress ((uint8_t * )bytes + 4 , bytes_len - 4 , output , output_size );
715
+ output_size = fastlz_decompress ((uint8_t * )bytes + 4 , ( int ) bytes_len - 4 , output , ( int ) output_size );
658
716
if (output_size == 0 ) {
659
717
efree (output );
660
718
pcbc_log (LOGARGS (WARN ), "Failed to uncompress data with fastlz" );
@@ -822,7 +880,7 @@ PHP_FUNCTION(basicDecoderV1)
822
880
json_array = php_array_fetchc_bool (options , "jsonassoc" );
823
881
}
824
882
825
- basic_decoder_v1 (bytes , bytes_len , flags , datatype , json_array , return_value TSRMLS_CC );
883
+ basic_decoder_v1 (bytes , ( int ) bytes_len , flags , datatype , json_array , return_value TSRMLS_CC );
826
884
}
827
885
828
886
/* {{{ proto \Couchbase\couchbase_passthru_encoder(string $value)
@@ -893,7 +951,7 @@ PHP_FUNCTION(defaultDecoder)
893
951
RETURN_NULL ();
894
952
}
895
953
896
- basic_decoder_v1 (bytes , bytes_len , flags , datatype , PCBCG (dec_json_array ), return_value TSRMLS_CC );
954
+ basic_decoder_v1 (bytes , ( int ) bytes_len , flags , datatype , PCBCG (dec_json_array ), return_value TSRMLS_CC );
897
955
}
898
956
899
957
PHP_FUNCTION (zlibCompress )
@@ -958,7 +1016,7 @@ PHP_FUNCTION(fastlzCompress)
958
1016
}
959
1017
960
1018
dataIn = PCBC_STRVAL_ZP (zdata );
961
- dataSize = PCBC_STRLEN_ZP (zdata );
1019
+ dataSize = ( unsigned long ) PCBC_STRLEN_ZP (zdata );
962
1020
dataOutSize = 4 + (dataSize + dataSize / 20 );
963
1021
dataOut = emalloc (dataOutSize );
964
1022
dataOutSize = fastlz_compress (dataIn , dataSize , (uint8_t * )dataOut + 4 );
@@ -980,7 +1038,7 @@ PHP_FUNCTION(fastlzDecompress)
980
1038
}
981
1039
982
1040
dataIn = PCBC_STRVAL_ZP (zdata );
983
- dataSize = PCBC_STRLEN_ZP (zdata );
1041
+ dataSize = ( unsigned long ) PCBC_STRLEN_ZP (zdata );
984
1042
dataOutSize = * (uint32_t * )dataIn ;
985
1043
dataOut = emalloc (dataOutSize );
986
1044
dataOutSize = fastlz_decompress ((uint8_t * )dataIn + 4 , dataSize - 4 , dataOut , dataOutSize );
@@ -994,7 +1052,7 @@ static PHP_MINFO_FUNCTION(couchbase)
994
1052
{
995
1053
char buf [128 ];
996
1054
const char * changeset ;
997
- lcb_error_t err ;
1055
+ lcb_STATUS err ;
998
1056
999
1057
err = lcb_cntl (NULL , LCB_CNTL_GET , LCB_CNTL_CHANGESET , (void * )& changeset );
1000
1058
if (err != LCB_SUCCESS ) {
0 commit comments