]> granicus.if.org Git - php/commitdiff
- Make fileinfo compile with PHP 5.2 as well.
authorDerick Rethans <derick@php.net>
Tue, 10 Oct 2006 09:52:06 +0000 (09:52 +0000)
committerDerick Rethans <derick@php.net>
Tue, 10 Oct 2006 09:52:06 +0000 (09:52 +0000)
ext/fileinfo/fileinfo.c

index 4f3d0cb1e6c8843d4960a3dd9e66b8bae9fe21a6..e22d82914f40070a0eabe921acd42df7cca0e3c4 100644 (file)
@@ -121,10 +121,17 @@ PHP_FILEINFO_API zend_object_value finfo_objects_new(zend_class_entry *class_typ
 /* {{{ finfo_class_functions
  */
 function_entry finfo_class_functions[] = {
-       ZEND_ME_MAPPING(finfo,          finfo_open,     NULL)
-       ZEND_ME_MAPPING(set_flags,      finfo_set_flags,NULL)
-       ZEND_ME_MAPPING(file,           finfo_file,     NULL)
-       ZEND_ME_MAPPING(buffer,         finfo_buffer,   NULL)
+#if PHP_VERSION_ID >= 50200
+       ZEND_ME_MAPPING(finfo,          finfo_open,     NULL, ZEND_ACC_PUBLIC)
+       ZEND_ME_MAPPING(set_flags,      finfo_set_flags,NULL, ZEND_ACC_PUBLIC)
+       ZEND_ME_MAPPING(file,           finfo_file,     NULL, ZEND_ACC_PUBLIC)
+       ZEND_ME_MAPPING(buffer,         finfo_buffer,   NULL, ZEND_ACC_PUBLIC)
+#else
+       ZEND_ME_MAPPING(finfo,          finfo_open,     NULL)
+       ZEND_ME_MAPPING(set_flags,      finfo_set_flags,NULL)
+       ZEND_ME_MAPPING(file,           finfo_file,     NULL)
+       ZEND_ME_MAPPING(buffer,         finfo_buffer,   NULL)
+#endif
        {NULL, NULL, NULL}
 };
 /* }}} */