From: Robin Barker Date: Thu, 24 Aug 2006 13:22:47 +0000 (+0100) Subject: change 28744 broke ODBM_File X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eb5402b2a7d45862a5feaae8ddab00f7e505298a;p=p5sagit%2Fp5-mst-13.2.git change 28744 broke ODBM_File From: "Robin Barker" Message-ID: <2C2E01334A940D4792B3E115F95B7226120A1A@exchsvr1.npl.ad.local> p4raw-id: //depot/perl@28754 --- diff --git a/ext/ODBM_File/ODBM_File.xs b/ext/ODBM_File/ODBM_File.xs index e50e8df..3504ff6 100644 --- a/ext/ODBM_File/ODBM_File.xs +++ b/ext/ODBM_File/ODBM_File.xs @@ -15,7 +15,11 @@ int dbminit(char* filename); int dbmclose(void); datum fetch(datum key); int store(datum key, datum dat); -int odelete(datum key); /* Cannot be delete() because of C++. */ +# ifdef __cplusplus +int odelete(datum key); /* Cannot be delete() for C++. */ +# else +int delete(datum key); +# endif datum firstkey(void); datum nextkey(datum key); #endif @@ -53,7 +57,11 @@ typedef datum datum_value ; #define odbm_FETCH(db,key) fetch(key) #define odbm_STORE(db,key,value,flags) store(key,value) -#define odbm_DELETE(db,key) odelete(key) +#ifdef __cplusplus +# define odbm_DELETE(db,key) odelete(key) +#else +# define odbm_DELETE(db,key) delete(key) +#endif #define odbm_FIRSTKEY(db) firstkey() #define odbm_NEXTKEY(db,key) nextkey(key)