text: 
  #include <php.h>
  #include <git2.h>
  
  #include "php_git2_internal.h"
  
  PHP_FUNCTION(git_index_checksum)
  {
      zend_result zendParse;
      zval *zindex;
      struct php_git2_index *index;
      zend_class_entry *ceIndex;
      const git_oid *oid;
      char strOid[GIT_OID_HEXSZ + 1];
  
      ceIndex = php_git2_get_index_ce();
      zendParse = zend_parse_parameters(ZEND_NUM_ARGS(), "O", \
              &zindex, ceIndex);
      if (zendParse != SUCCESS)
          RETURN_THROWS();
      index = gitind_fetch_object(Z_OBJ_P(zindex));
      oid = git_index_checksum(index->s);
      git_oid_tostr(strOid, GIT_OID_HEXSZ + 1, oid);
      RETURN_STRING(strOid);
  }
  
  