@@ -135,7 +135,7 @@ int php_git2_make_resource(php_git2_t **out, enum php_git2_resource_type type, v
135135 PHP_GIT2_V (result , commit ) = (git_commit * )resource ;
136136 break ;
137137 case PHP_GIT2_TYPE_TREE :
138- PHP_GIT2_V (result , commit ) = (git_tree * )resource ;
138+ PHP_GIT2_V (result , tree ) = (git_tree * )resource ;
139139 break ;
140140 case PHP_GIT2_TYPE_TREE_ENTRY :
141141 PHP_GIT2_V (result , tree_entry ) = (git_tree_entry * )resource ;
@@ -236,6 +236,33 @@ int php_git2_make_resource(php_git2_t **out, enum php_git2_resource_type type, v
236236 case PHP_GIT2_TYPE_NOTE_ITERATOR :
237237 PHP_GIT2_V (result , note_iterator ) = (git_note_iterator * )resource ;
238238 break ;
239+ case PHP_GIT2_TYPE_ODB_STREAM :
240+ PHP_GIT2_V (result , odb_stream ) = (git_odb_stream * )resource ;
241+ break ;
242+ case PHP_GIT2_TYPE_ODB_OBJECT :
243+ PHP_GIT2_V (result , odb_object ) = (git_odb_object * )resource ;
244+ break ;
245+ case PHP_GIT2_TYPE_ODB_WRITEPACK :
246+ PHP_GIT2_V (result , odb_writepack ) = (git_odb_writepack * )resource ;
247+ break ;
248+ case PHP_GIT2_TYPE_ODB_BACKEND :
249+ PHP_GIT2_V (result , odb_backend ) = (git_odb_backend * )resource ;
250+ break ;
251+ case PHP_GIT2_TYPE_REFLOG :
252+ PHP_GIT2_V (result , reflog ) = (git_reflog * )resource ;
253+ break ;
254+ case PHP_GIT2_TYPE_REFLOG_ENTRY :
255+ PHP_GIT2_V (result , reflog_entry ) = (git_reflog_entry * )resource ;
256+ break ;
257+ case PHP_GIT2_TYPE_BLAME :
258+ PHP_GIT2_V (result , blame ) = (git_blame * )resource ;
259+ break ;
260+ case PHP_GIT2_TYPE_PACKBUILDER :
261+ PHP_GIT2_V (result , packbuilder ) = (git_packbuilder * )resource ;
262+ break ;
263+ case PHP_GIT2_TYPE_SUBMODULE :
264+ PHP_GIT2_V (result , submodule ) = (git_submodule * )resource ;
265+ break ;
239266 default :
240267 php_error_docref (NULL TSRMLS_CC , E_ERROR , "passed resource type does not support. probably bug." );
241268 }
0 commit comments