change 28744 broke ODBM_File
Robin Barker [Thu, 24 Aug 2006 13:22:47 +0000 (14:22 +0100)]
From: "Robin Barker" <Robin.Barker@npl.co.uk>
Message-ID: <2C2E01334A940D4792B3E115F95B7226120A1A@exchsvr1.npl.ad.local>

p4raw-id: //depot/perl@28754

ext/ODBM_File/ODBM_File.xs

index e50e8df..3504ff6 100644 (file)
@@ -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)