diff options
author | Marcus Boerger <helly@php.net> | 2002-11-10 17:58:46 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2002-11-10 17:58:46 +0000 |
commit | 705a4e251c904048d1eb54a02b5886ebf9efc769 (patch) | |
tree | 71d859d78988904a998c73f79f9b8f734df2295a /ext/dba/php_dba.h | |
parent | 830c2e0df6f6813217fc1bc224eeb78674530ae3 (diff) | |
download | php-git-705a4e251c904048d1eb54a02b5886ebf9efc769.tar.gz |
-Centralise open stream for builtin modules that use streams
-If locks work on database file then only one stream open call is used
Diffstat (limited to 'ext/dba/php_dba.h')
-rw-r--r-- | ext/dba/php_dba.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ext/dba/php_dba.h b/ext/dba/php_dba.h index 661f6af97b..dfddfda3c4 100644 --- a/ext/dba/php_dba.h +++ b/ext/dba/php_dba.h @@ -42,23 +42,26 @@ typedef struct dba_info { void *dbf; /* ptr to private data or whatever */ char *path; dba_mode_t mode; + php_stream *fp; /* this is the database stream for builtin handlers */ /* arg[cv] are only available when the dba_open handler is called! */ int argc; zval ***argv; /* private */ - struct dba_handler *hnd; + struct dba_handler *hnd; dba_lock lock; } dba_info; -#define DBA_LOCK_READER (1) -#define DBA_LOCK_WRITER (2) -#define DBA_LOCK_CREAT (4) -#define DBA_LOCK_TRUNC (8) +#define DBA_LOCK_READER (0x0001) +#define DBA_LOCK_WRITER (0x0002) +#define DBA_LOCK_CREAT (0x0004) +#define DBA_LOCK_TRUNC (0x0008) #define DBA_LOCK_EXT (0) #define DBA_LOCK_ALL (DBA_LOCK_READER|DBA_LOCK_WRITER|DBA_LOCK_CREAT|DBA_LOCK_TRUNC) #define DBA_LOCK_WCT (DBA_LOCK_WRITER|DBA_LOCK_CREAT|DBA_LOCK_TRUNC) +#define DBA_STREAM_OPEN (0x0010) + extern zend_module_entry dba_module_entry; #define dba_module_ptr &dba_module_entry |