Skip to content

Commit

Permalink
- Fix tor the "undefined symbol: git_index_get in Unknown on line 0" …
Browse files Browse the repository at this point in the history
…error for the php module
  • Loading branch information
Alex White committed Feb 22, 2013
1 parent b28d145 commit 8f8627b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ PHP_METHOD(git2_index, writeTree)
int error = 0;

m_index = PHP_GIT2_GET_OBJECT(php_git2_index, getThis());
error = git_tree_create_fromindex(&tree_oid, m_index->index);
error = git_index_write_tree(&tree_oid, m_index->index);

git_oid_fmt(oid_out, &tree_oid);
RETVAL_STRINGL(oid_out,GIT_OID_HEXSZ,1);
Expand All @@ -115,7 +115,7 @@ PHP_METHOD(git2_index, current)
zval *z_entry;

m_index = PHP_GIT2_GET_OBJECT(php_git2_index, getThis());
entry = git_index_get(m_index->index, m_index->offset);
entry = git_index_get_byindex(m_index->index, m_index->offset);
if (entry == NULL) {
zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0 TSRMLS_CC,
"specified offset does not exist. %d");
Expand Down Expand Up @@ -199,4 +199,4 @@ void php_git2_index_init(TSRMLS_D)
git2_index_class_entry = zend_register_internal_class(&ce TSRMLS_CC);
git2_index_class_entry->create_object = php_git2_index_new;
zend_class_implements(git2_index_class_entry TSRMLS_CC, 1, spl_ce_Iterator);
}
}

0 comments on commit 8f8627b

Please sign in to comment.