Skip to content

Commit 7debc8a

Browse files
committed
PHPC-908: Do not declare MINIT functions for each driver class
1 parent 931e9d9 commit 7debc8a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+161
-464
lines changed

php_phongo.c

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1928,48 +1928,50 @@ PHP_MINIT_FUNCTION(mongodb)
19281928
return FAILURE;
19291929
}
19301930

1931-
PHP_MINIT(bson)(INIT_FUNC_ARGS_PASSTHRU);
1932-
1933-
PHP_MINIT(Type)(INIT_FUNC_ARGS_PASSTHRU);
1934-
PHP_MINIT(Serializable)(INIT_FUNC_ARGS_PASSTHRU);
1935-
PHP_MINIT(Unserializable)(INIT_FUNC_ARGS_PASSTHRU);
1936-
PHP_MINIT(Persistable)(INIT_FUNC_ARGS_PASSTHRU);
1937-
PHP_MINIT(Binary)(INIT_FUNC_ARGS_PASSTHRU);
1938-
PHP_MINIT(Decimal128)(INIT_FUNC_ARGS_PASSTHRU);
1939-
PHP_MINIT(Javascript)(INIT_FUNC_ARGS_PASSTHRU);
1940-
PHP_MINIT(MaxKey)(INIT_FUNC_ARGS_PASSTHRU);
1941-
PHP_MINIT(MinKey)(INIT_FUNC_ARGS_PASSTHRU);
1942-
PHP_MINIT(ObjectID)(INIT_FUNC_ARGS_PASSTHRU);
1943-
PHP_MINIT(Regex)(INIT_FUNC_ARGS_PASSTHRU);
1944-
PHP_MINIT(Timestamp)(INIT_FUNC_ARGS_PASSTHRU);
1945-
PHP_MINIT(UTCDateTime)(INIT_FUNC_ARGS_PASSTHRU);
1946-
1947-
PHP_MINIT(Command)(INIT_FUNC_ARGS_PASSTHRU);
1948-
PHP_MINIT(Cursor)(INIT_FUNC_ARGS_PASSTHRU);
1949-
PHP_MINIT(CursorId)(INIT_FUNC_ARGS_PASSTHRU);
1950-
PHP_MINIT(Manager)(INIT_FUNC_ARGS_PASSTHRU);
1951-
PHP_MINIT(Query)(INIT_FUNC_ARGS_PASSTHRU);
1952-
PHP_MINIT(ReadConcern)(INIT_FUNC_ARGS_PASSTHRU);
1953-
PHP_MINIT(ReadPreference)(INIT_FUNC_ARGS_PASSTHRU);
1954-
PHP_MINIT(Server)(INIT_FUNC_ARGS_PASSTHRU);
1955-
PHP_MINIT(BulkWrite)(INIT_FUNC_ARGS_PASSTHRU);
1956-
PHP_MINIT(WriteConcern)(INIT_FUNC_ARGS_PASSTHRU);
1957-
PHP_MINIT(WriteConcernError)(INIT_FUNC_ARGS_PASSTHRU);
1958-
PHP_MINIT(WriteError)(INIT_FUNC_ARGS_PASSTHRU);
1959-
PHP_MINIT(WriteResult)(INIT_FUNC_ARGS_PASSTHRU);
1960-
1961-
PHP_MINIT(Exception)(INIT_FUNC_ARGS_PASSTHRU);
1962-
PHP_MINIT(LogicException)(INIT_FUNC_ARGS_PASSTHRU);
1963-
PHP_MINIT(RuntimeException)(INIT_FUNC_ARGS_PASSTHRU);
1964-
PHP_MINIT(UnexpectedValueException)(INIT_FUNC_ARGS_PASSTHRU);
1965-
PHP_MINIT(InvalidArgumentException)(INIT_FUNC_ARGS_PASSTHRU);
1966-
PHP_MINIT(ConnectionException)(INIT_FUNC_ARGS_PASSTHRU);
1967-
PHP_MINIT(AuthenticationException)(INIT_FUNC_ARGS_PASSTHRU);
1968-
PHP_MINIT(SSLConnectionException)(INIT_FUNC_ARGS_PASSTHRU);
1969-
PHP_MINIT(WriteException)(INIT_FUNC_ARGS_PASSTHRU);
1970-
PHP_MINIT(BulkWriteException)(INIT_FUNC_ARGS_PASSTHRU);
1971-
PHP_MINIT(ExecutionTimeoutException)(INIT_FUNC_ARGS_PASSTHRU);
1972-
PHP_MINIT(ConnectionTimeoutException)(INIT_FUNC_ARGS_PASSTHRU);
1931+
/* Register base BSON classes first */
1932+
php_phongo_type_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1933+
php_phongo_serializable_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1934+
php_phongo_unserializable_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1935+
1936+
php_phongo_binary_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1937+
php_phongo_decimal128_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1938+
php_phongo_javascript_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1939+
php_phongo_maxkey_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1940+
php_phongo_minkey_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1941+
php_phongo_objectid_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1942+
php_phongo_persistable_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1943+
php_phongo_regex_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1944+
php_phongo_timestamp_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1945+
php_phongo_utcdatetime_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1946+
1947+
php_phongo_bulkwrite_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1948+
php_phongo_command_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1949+
php_phongo_cursor_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1950+
php_phongo_cursorid_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1951+
php_phongo_manager_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1952+
php_phongo_query_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1953+
php_phongo_readconcern_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1954+
php_phongo_readpreference_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1955+
php_phongo_server_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1956+
php_phongo_writeconcern_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1957+
php_phongo_writeconcernerror_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1958+
php_phongo_writeerror_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1959+
php_phongo_writeresult_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1960+
1961+
/* Register base exception classes first */
1962+
php_phongo_exception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1963+
php_phongo_runtimeexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1964+
php_phongo_connectionexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1965+
php_phongo_writeexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1966+
1967+
php_phongo_authenticationexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1968+
php_phongo_bulkwriteexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1969+
php_phongo_connectiontimeoutexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1970+
php_phongo_executiontimeoutexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1971+
php_phongo_invalidargumentexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1972+
php_phongo_logicexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1973+
php_phongo_sslconnectionexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
1974+
php_phongo_unexpectedvalueexception_init_ce(INIT_FUNC_ARGS_PASSTHRU);
19731975

19741976
REGISTER_STRING_CONSTANT("MONGODB_VERSION", (char *)MONGODB_VERSION_S, CONST_CS | CONST_PERSISTENT);
19751977
REGISTER_STRING_CONSTANT("MONGODB_STABILITY", (char *)MONGODB_STABILITY_S, CONST_CS | CONST_PERSISTENT);

php_phongo.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ void _phongo_debug_bson(bson_t *bson);
164164
#define _phongo_debug_bson(bson)
165165
#endif
166166

167-
PHP_MINIT_FUNCTION(bson);
168-
169167
#endif /* PHONGO_H */
170168

171169

php_phongo_classes.h

Lines changed: 41 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -235,53 +235,52 @@ extern zend_class_entry *php_phongo_regex_ce;
235235
extern zend_class_entry *php_phongo_timestamp_ce;
236236
extern zend_class_entry *php_phongo_utcdatetime_ce;
237237

238+
extern void php_phongo_binary_init_ce(INIT_FUNC_ARGS);
239+
extern void php_phongo_decimal128_init_ce(INIT_FUNC_ARGS);
240+
extern void php_phongo_javascript_init_ce(INIT_FUNC_ARGS);
241+
extern void php_phongo_maxkey_init_ce(INIT_FUNC_ARGS);
242+
extern void php_phongo_minkey_init_ce(INIT_FUNC_ARGS);
243+
extern void php_phongo_objectid_init_ce(INIT_FUNC_ARGS);
244+
extern void php_phongo_persistable_init_ce(INIT_FUNC_ARGS);
245+
extern void php_phongo_regex_init_ce(INIT_FUNC_ARGS);
246+
extern void php_phongo_serializable_init_ce(INIT_FUNC_ARGS);
247+
extern void php_phongo_timestamp_init_ce(INIT_FUNC_ARGS);
248+
extern void php_phongo_type_init_ce(INIT_FUNC_ARGS);
249+
extern void php_phongo_utcdatetime_init_ce(INIT_FUNC_ARGS);
250+
extern void php_phongo_unserializable_init_ce(INIT_FUNC_ARGS);
251+
252+
extern void php_phongo_bulkwrite_init_ce(INIT_FUNC_ARGS);
253+
extern void php_phongo_command_init_ce(INIT_FUNC_ARGS);
254+
extern void php_phongo_cursor_init_ce(INIT_FUNC_ARGS);
255+
extern void php_phongo_cursorid_init_ce(INIT_FUNC_ARGS);
256+
extern void php_phongo_manager_init_ce(INIT_FUNC_ARGS);
257+
extern void php_phongo_query_init_ce(INIT_FUNC_ARGS);
258+
extern void php_phongo_readconcern_init_ce(INIT_FUNC_ARGS);
259+
extern void php_phongo_readpreference_init_ce(INIT_FUNC_ARGS);
260+
extern void php_phongo_server_init_ce(INIT_FUNC_ARGS);
261+
extern void php_phongo_writeconcern_init_ce(INIT_FUNC_ARGS);
262+
extern void php_phongo_writeconcernerror_init_ce(INIT_FUNC_ARGS);
263+
extern void php_phongo_writeerror_init_ce(INIT_FUNC_ARGS);
264+
extern void php_phongo_writeresult_init_ce(INIT_FUNC_ARGS);
265+
266+
extern void php_phongo_authenticationexception_init_ce(INIT_FUNC_ARGS);
267+
extern void php_phongo_bulkwriteexception_init_ce(INIT_FUNC_ARGS);
268+
extern void php_phongo_connectionexception_init_ce(INIT_FUNC_ARGS);
269+
extern void php_phongo_connectiontimeoutexception_init_ce(INIT_FUNC_ARGS);
270+
extern void php_phongo_exception_init_ce(INIT_FUNC_ARGS);
271+
extern void php_phongo_executiontimeoutexception_init_ce(INIT_FUNC_ARGS);
272+
extern void php_phongo_invalidargumentexception_init_ce(INIT_FUNC_ARGS);
273+
extern void php_phongo_logicexception_init_ce(INIT_FUNC_ARGS);
274+
extern void php_phongo_runtimeexception_init_ce(INIT_FUNC_ARGS);
275+
extern void php_phongo_sslconnectionexception_init_ce(INIT_FUNC_ARGS);
276+
extern void php_phongo_unexpectedvalueexception_init_ce(INIT_FUNC_ARGS);
277+
extern void php_phongo_writeexception_init_ce(INIT_FUNC_ARGS);
278+
238279
/* Shared across all MongoDB\Driver objects to disable unserialize() */
239280
PHP_METHOD(Manager, __wakeup);
240281
/* Shared across all final MongoDB\Driver value objects, only possible to construct them internally */
241282
PHP_METHOD(Server, __construct);
242283

243-
PHP_MINIT_FUNCTION(Command);
244-
PHP_MINIT_FUNCTION(Cursor);
245-
PHP_MINIT_FUNCTION(CursorId);
246-
PHP_MINIT_FUNCTION(Manager);
247-
PHP_MINIT_FUNCTION(Query);
248-
PHP_MINIT_FUNCTION(ReadConcern);
249-
PHP_MINIT_FUNCTION(ReadPreference);
250-
PHP_MINIT_FUNCTION(Result);
251-
PHP_MINIT_FUNCTION(Server);
252-
PHP_MINIT_FUNCTION(BulkWrite);
253-
PHP_MINIT_FUNCTION(WriteConcern);
254-
PHP_MINIT_FUNCTION(WriteConcernError);
255-
PHP_MINIT_FUNCTION(WriteError);
256-
PHP_MINIT_FUNCTION(WriteResult);
257-
258-
PHP_MINIT_FUNCTION(Exception);
259-
PHP_MINIT_FUNCTION(LogicException);
260-
PHP_MINIT_FUNCTION(RuntimeException);
261-
PHP_MINIT_FUNCTION(UnexpectedValueException);
262-
PHP_MINIT_FUNCTION(InvalidArgumentException);
263-
PHP_MINIT_FUNCTION(ConnectionException);
264-
PHP_MINIT_FUNCTION(AuthenticationException);
265-
PHP_MINIT_FUNCTION(SSLConnectionException);
266-
PHP_MINIT_FUNCTION(ExecutionTimeoutException);
267-
PHP_MINIT_FUNCTION(ConnectionTimeoutException);
268-
PHP_MINIT_FUNCTION(WriteException);
269-
PHP_MINIT_FUNCTION(BulkWriteException);
270-
271-
PHP_MINIT_FUNCTION(Type);
272-
PHP_MINIT_FUNCTION(Unserializable);
273-
PHP_MINIT_FUNCTION(Serializable);
274-
PHP_MINIT_FUNCTION(Persistable);
275-
PHP_MINIT_FUNCTION(Binary);
276-
PHP_MINIT_FUNCTION(Decimal128);
277-
PHP_MINIT_FUNCTION(Javascript);
278-
PHP_MINIT_FUNCTION(MaxKey);
279-
PHP_MINIT_FUNCTION(MinKey);
280-
PHP_MINIT_FUNCTION(ObjectID);
281-
PHP_MINIT_FUNCTION(Regex);
282-
PHP_MINIT_FUNCTION(Timestamp);
283-
PHP_MINIT_FUNCTION(UTCDateTime);
284-
285284
#endif /* PHONGO_CLASSES_H */
286285

287286

src/BSON/Binary.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -449,11 +449,9 @@ HashTable *php_phongo_binary_get_properties(zval *object TSRMLS_DC) /* {{{ */
449449
} /* }}} */
450450
/* }}} */
451451

452-
/* {{{ PHP_MINIT_FUNCTION */
453-
PHP_MINIT_FUNCTION(Binary)
452+
void php_phongo_binary_init_ce(INIT_FUNC_ARGS) /* {{{ */
454453
{
455454
zend_class_entry ce;
456-
(void)type;(void)module_number;
457455

458456
INIT_NS_CLASS_ENTRY(ce, "MongoDB\\BSON", "Binary", php_phongo_binary_me);
459457
php_phongo_binary_ce = zend_register_internal_class(&ce TSRMLS_CC);
@@ -480,12 +478,7 @@ PHP_MINIT_FUNCTION(Binary)
480478
zend_declare_class_constant_long(php_phongo_binary_ce, ZEND_STRL("TYPE_UUID"), BSON_SUBTYPE_UUID TSRMLS_CC);
481479
zend_declare_class_constant_long(php_phongo_binary_ce, ZEND_STRL("TYPE_MD5"), BSON_SUBTYPE_MD5 TSRMLS_CC);
482480
zend_declare_class_constant_long(php_phongo_binary_ce, ZEND_STRL("TYPE_USER_DEFINED"), BSON_SUBTYPE_USER TSRMLS_CC);
483-
484-
return SUCCESS;
485-
}
486-
/* }}} */
487-
488-
481+
} /* }}} */
489482

490483
/*
491484
* Local variables:

src/BSON/Decimal128.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,9 @@ HashTable *php_phongo_decimal128_get_properties(zval *object TSRMLS_DC) /* {{{ *
364364
} /* }}} */
365365
/* }}} */
366366

367-
/* {{{ PHP_MINIT_FUNCTION */
368-
PHP_MINIT_FUNCTION(Decimal128)
367+
void php_phongo_decimal128_init_ce(INIT_FUNC_ARGS) /* {{{ */
369368
{
370369
zend_class_entry ce;
371-
(void)type;(void)module_number;
372370

373371
INIT_NS_CLASS_ENTRY(ce, "MongoDB\\BSON", "Decimal128", php_phongo_decimal128_me);
374372
php_phongo_decimal128_ce = zend_register_internal_class(&ce TSRMLS_CC);
@@ -386,10 +384,7 @@ PHP_MINIT_FUNCTION(Decimal128)
386384
php_phongo_handler_decimal128.free_obj = php_phongo_decimal128_free_object;
387385
php_phongo_handler_decimal128.offset = XtOffsetOf(php_phongo_decimal128_t, std);
388386
#endif
389-
390-
return SUCCESS;
391-
}
392-
/* }}} */
387+
} /* }}} */
393388

394389
/*
395390
* Local variables:

src/BSON/Javascript.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -528,12 +528,9 @@ HashTable *php_phongo_javascript_get_properties(zval *object TSRMLS_DC) /* {{{ *
528528
} /* }}} */
529529
/* }}} */
530530

531-
/* {{{ PHP_MINIT_FUNCTION */
532-
PHP_MINIT_FUNCTION(Javascript)
531+
void php_phongo_javascript_init_ce(INIT_FUNC_ARGS) /* {{{ */
533532
{
534533
zend_class_entry ce;
535-
(void)type;(void)module_number;
536-
537534

538535
INIT_NS_CLASS_ENTRY(ce, "MongoDB\\BSON", "Javascript", php_phongo_javascript_me);
539536
php_phongo_javascript_ce = zend_register_internal_class(&ce TSRMLS_CC);
@@ -552,12 +549,7 @@ PHP_MINIT_FUNCTION(Javascript)
552549
php_phongo_handler_javascript.free_obj = php_phongo_javascript_free_object;
553550
php_phongo_handler_javascript.offset = XtOffsetOf(php_phongo_javascript_t, std);
554551
#endif
555-
556-
return SUCCESS;
557-
}
558-
/* }}} */
559-
560-
552+
} /* }}} */
561553

562554
/*
563555
* Local variables:

src/BSON/MaxKey.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,9 @@ phongo_create_object_retval php_phongo_maxkey_create_object(zend_class_entry *cl
153153
} /* }}} */
154154
/* }}} */
155155

156-
/* {{{ PHP_MINIT_FUNCTION */
157-
PHP_MINIT_FUNCTION(MaxKey)
156+
void php_phongo_maxkey_init_ce(INIT_FUNC_ARGS) /* {{{ */
158157
{
159158
zend_class_entry ce;
160-
(void)type;(void)module_number;
161-
162159

163160
INIT_NS_CLASS_ENTRY(ce, "MongoDB\\BSON", "MaxKey", php_phongo_maxkey_me);
164161
php_phongo_maxkey_ce = zend_register_internal_class(&ce TSRMLS_CC);
@@ -174,12 +171,7 @@ PHP_MINIT_FUNCTION(MaxKey)
174171
php_phongo_handler_maxkey.free_obj = php_phongo_maxkey_free_object;
175172
php_phongo_handler_maxkey.offset = XtOffsetOf(php_phongo_maxkey_t, std);
176173
#endif
177-
178-
return SUCCESS;
179-
}
180-
/* }}} */
181-
182-
174+
} /* }}} */
183175

184176
/*
185177
* Local variables:

src/BSON/MinKey.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,9 @@ phongo_create_object_retval php_phongo_minkey_create_object(zend_class_entry *cl
154154
} /* }}} */
155155
/* }}} */
156156

157-
/* {{{ PHP_MINIT_FUNCTION */
158-
PHP_MINIT_FUNCTION(MinKey)
157+
void php_phongo_minkey_init_ce(INIT_FUNC_ARGS) /* {{{ */
159158
{
160159
zend_class_entry ce;
161-
(void)type;(void)module_number;
162-
163160

164161
INIT_NS_CLASS_ENTRY(ce, "MongoDB\\BSON", "MinKey", php_phongo_minkey_me);
165162
php_phongo_minkey_ce = zend_register_internal_class(&ce TSRMLS_CC);
@@ -175,12 +172,7 @@ PHP_MINIT_FUNCTION(MinKey)
175172
php_phongo_handler_minkey.free_obj = php_phongo_minkey_free_object;
176173
php_phongo_handler_minkey.offset = XtOffsetOf(php_phongo_minkey_t, std);
177174
#endif
178-
179-
return SUCCESS;
180-
}
181-
/* }}} */
182-
183-
175+
} /* }}} */
184176

185177
/*
186178
* Local variables:

src/BSON/ObjectID.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -414,11 +414,9 @@ HashTable *php_phongo_objectid_get_properties(zval *object TSRMLS_DC) /* {{{ */
414414
} /* }}} */
415415
/* }}} */
416416

417-
/* {{{ PHP_MINIT_FUNCTION */
418-
PHP_MINIT_FUNCTION(ObjectID)
417+
void php_phongo_objectid_init_ce(INIT_FUNC_ARGS) /* {{{ */
419418
{
420419
zend_class_entry ce;
421-
(void)type;(void)module_number;
422420

423421
INIT_NS_CLASS_ENTRY(ce, "MongoDB\\BSON", "ObjectID", php_phongo_objectid_me);
424422
php_phongo_objectid_ce = zend_register_internal_class(&ce TSRMLS_CC);
@@ -437,12 +435,7 @@ PHP_MINIT_FUNCTION(ObjectID)
437435
php_phongo_handler_objectid.free_obj = php_phongo_objectid_free_object;
438436
php_phongo_handler_objectid.offset = XtOffsetOf(php_phongo_objectid_t, std);
439437
#endif
440-
441-
return SUCCESS;
442-
}
443-
/* }}} */
444-
445-
438+
} /* }}} */
446439

447440
/*
448441
* Local variables:

src/BSON/Persistable.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,14 @@ static zend_function_entry php_phongo_persistable_me[] = {
4949

5050
/* }}} */
5151

52-
53-
54-
/* {{{ PHP_MINIT_FUNCTION */
55-
PHP_MINIT_FUNCTION(Persistable)
52+
void php_phongo_persistable_init_ce(INIT_FUNC_ARGS) /* {{{ */
5653
{
5754
zend_class_entry ce;
58-
(void)type;(void)module_number;
5955

6056
INIT_NS_CLASS_ENTRY(ce, "MongoDB\\BSON", "Persistable", php_phongo_persistable_me);
6157
php_phongo_persistable_ce = zend_register_internal_interface(&ce TSRMLS_CC);
6258
zend_class_implements(php_phongo_persistable_ce TSRMLS_CC, 2, php_phongo_unserializable_ce, php_phongo_serializable_ce);
63-
64-
return SUCCESS;
65-
}
66-
/* }}} */
67-
68-
59+
} /* }}} */
6960

7061
/*
7162
* Local variables:

0 commit comments

Comments
 (0)