Skip to content

Commit d499ed4

Browse files
committed
remove Git2\ODB::addBackend and Git2\ODB::addAlternate methods.
these methods does not expect hotswap backends. will be add `Git2\ODB Git2\ODB::withBackends(array $backends[, array $alternate_backends])` instead of these.
1 parent bc06227 commit d499ed4

1 file changed

Lines changed: 0 additions & 38 deletions

File tree

odb.c

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -204,49 +204,11 @@ PHP_METHOD(git2_odb, read)
204204
}
205205
/* }}} */
206206

207-
208-
/*
209-
{{{ proto: Git2\ODB::addAlternate(Git2\Backend $backend, $priority)
210-
*/
211-
PHP_METHOD(git2_odb, addAlternate)
212-
{
213-
}
214-
/* }}} */
215-
216-
/*
217-
{{{ proto: Git2\ODB::addBackend(Git2\Backend $backend, $priority)
218-
*/
219-
PHP_METHOD(git2_odb, addBackend)
220-
{
221-
zval *backend = NULL;
222-
php_git2_backend *m_backend;
223-
php_git2_odb *m_odb;
224-
long priority = 5;
225-
int error = 0;
226-
227-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
228-
"Ol", &backend, git2_backend_class_entry, &priority) == FAILURE) {
229-
return;
230-
}
231-
232-
m_odb = PHP_GIT2_GET_OBJECT(php_git2_odb, getThis());
233-
m_backend = PHP_GIT2_GET_OBJECT(php_git2_backend, backend);
234-
235-
error = git_odb_add_backend(m_odb->odb, m_backend->backend, priority);
236-
PHP_GIT2_EXCEPTION_CHECK(error);
237-
238-
RETURN_TRUE;
239-
}
240-
/* }}} */
241-
242-
243207
static zend_function_entry php_git2_odb_methods[] = {
244208
PHP_ME(git2_odb, hash, arginfo_git2_odb_hash, ZEND_ACC_PUBLIC)
245209
PHP_ME(git2_odb, write, arginfo_git2_odb_write, ZEND_ACC_PUBLIC)
246210
PHP_ME(git2_odb, exists, arginfo_git2_odb_exists, ZEND_ACC_PUBLIC)
247211
PHP_ME(git2_odb, read, arginfo_git2_odb_read, ZEND_ACC_PUBLIC)
248-
PHP_ME(git2_odb, addAlternate, arginfo_git2_odb_add_alternate, ZEND_ACC_PUBLIC)
249-
PHP_ME(git2_odb, addBackend, arginfo_git2_odb_add_backend, ZEND_ACC_PUBLIC)
250212
{NULL,NULL,NULL}
251213
};
252214

0 commit comments

Comments
 (0)