Lines Matching refs:finfo
59 #define FILEINFO_FROM_OBJECT(finfo, object) \ argument
62 finfo = obj->ptr; \
63 if (!finfo) { \
107 PHP_MINIT_FUNCTION(finfo) in PHP_MINIT_FUNCTION() argument
147 PHP_MINIT(finfo),
182 php_fileinfo *finfo; in PHP_FUNCTION() local
228 finfo = emalloc(sizeof(php_fileinfo)); in PHP_FUNCTION()
230 finfo->options = options; in PHP_FUNCTION()
231 finfo->magic = magic_open(options); in PHP_FUNCTION()
233 if (finfo->magic == NULL) { in PHP_FUNCTION()
234 efree(finfo); in PHP_FUNCTION()
245 if (magic_load(finfo->magic, file) == -1) { in PHP_FUNCTION()
247 magic_close(finfo->magic); in PHP_FUNCTION()
248 efree(finfo); in PHP_FUNCTION()
262 obj->ptr = finfo; in PHP_FUNCTION()
266 obj->ptr = finfo; in PHP_FUNCTION()
289 php_fileinfo *finfo; in PHP_FUNCTION() local
295 FILEINFO_FROM_OBJECT(finfo, self); in PHP_FUNCTION()
297 FINFO_SET_OPTION(finfo->magic, options) in PHP_FUNCTION()
298 finfo->options = options; in PHP_FUNCTION()
313 php_fileinfo *finfo = NULL; in _php_finfo_get_type() local
352 FILEINFO_FROM_OBJECT(finfo, self); in _php_finfo_get_type()
353 magic = finfo->magic; in _php_finfo_get_type()
455 FINFO_SET_OPTION(magic, finfo->options) in _php_finfo_get_type()