summaryrefslogtreecommitdiff
path: root/ext/ODBM_File
diff options
context:
space:
mode:
authorRobin Barker <RMBarker@cpan.org>2006-08-24 14:22:47 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-08-24 12:36:08 +0000
commiteb5402b2a7d45862a5feaae8ddab00f7e505298a (patch)
tree683732445107c42660c4ba6f6f4af459b7caa805 /ext/ODBM_File
parentd5adc3a12662acc8bc057d4ab07a88843ba10e31 (diff)
downloadperl-eb5402b2a7d45862a5feaae8ddab00f7e505298a.tar.gz
change 28744 broke ODBM_File
From: "Robin Barker" <Robin.Barker@npl.co.uk> Message-ID: <2C2E01334A940D4792B3E115F95B7226120A1A@exchsvr1.npl.ad.local> p4raw-id: //depot/perl@28754
Diffstat (limited to 'ext/ODBM_File')
-rw-r--r--ext/ODBM_File/ODBM_File.xs12
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/ODBM_File/ODBM_File.xs b/ext/ODBM_File/ODBM_File.xs
index e50e8df58a..3504ff64fd 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)