Browse Source

Move object struct to header.

PEAR_1_4DEV
Marcus Boerger 22 years ago
parent
commit
a7217431be
  1. 14
      ext/spl/spl_directory.c
  2. 8
      ext/spl/spl_directory.h

14
ext/spl/spl_directory.c

@ -33,6 +33,7 @@
#include "spl_functions.h"
#include "spl_engine.h"
#include "spl_iterators.h"
#include "spl_directory.h"
#include "php.h"
#include "fopen_wrappers.h"
@ -107,19 +108,6 @@ zend_class_entry *spl_ce_DirectoryIterator;
zend_class_entry *spl_ce_RecursiveDirectoryIterator;
/* the overloaded class structure */
/* overloading the structure results in the need of having
dedicated creatin/cloning/destruction functions */
typedef struct _spl_ce_dir_object {
zend_object std;
php_stream *dirp;
php_stream_dirent entry;
char *path;
int index;
} spl_ce_dir_object;
/* {{{ spl_ce_dir_object_dtor */
/* close all resources and the memory allocated for the object */
static void spl_ce_dir_object_dtor(void *object, zend_object_handle handle TSRMLS_DC)

8
ext/spl/spl_directory.h

@ -26,6 +26,14 @@ extern zend_class_entry *spl_ce_DirectoryIterator;
PHP_MINIT_FUNCTION(spl_directory);
typedef struct _spl_ce_dir_object {
zend_object std;
php_stream *dirp;
php_stream_dirent entry;
char *path;
int index;
} spl_ce_dir_object;
#endif /* SPL_DIRECTORY_H */
/*

Loading…
Cancel
Save