Re: replacing dbm_* with dba_*
| From: | Sascha Schumann | Date: | Sun, 20 Jun 1999 16:02:39 +0000 |
| Subject: | Re: replacing dbm_* with dba_* | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-7230@lists.php.net to get a copy of this message | ||
On Sun, Jun 20, 1999 at 11:53:24AM -0400, Rasmus Lerdorf wrote:
> > For example, one can access the modern DB2 through the historic
> > ndbm interface. Hence, your db.c supports DB2 without explicitly
> > coding to the DB2 interface (db_open() stuff). That's what I mean
> > by "accident."
>
> Ah correct for the DB2 case. For the DB1 case it wasn't quite that clear.
> There are annoying little differences across the api's and although they
> look the same, they don't behave exactly the same. I remember fighting
> different memory allocation issues and also the returned datum size was
> off by one in gdbm.
>
> -Rasmus
Or look at this little art work in dba_db2.c:
#if (DB_VERSION_MAJOR > 2) || (DB_VERSION_MAJOR == 2 &&
DB_VERSION_MINOR > 6) || (DB_VERSION_MAJOR == 2 &&
DB_VERSION_MINOR == 6 && DB_VERSION_PATCH >= 4)
if(dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0)) {
#else
if(dba->dbp->cursor(dba->dbp, NULL, &dba->cursor)) {
#endif
They changed their interface during _minor_ releases :-(
--
Regards,
Sascha Schumann
Consultant