From e60d50b81e12f429d17cff120030adfe114743b8 Mon Sep 17 00:00:00 2001 From: Kenichi Ishigaki Date: Tue, 3 Nov 2009 17:24:34 +0000 Subject: [PATCH] DBD::SQLite: let us know if the debug macros are enabled --- dbdimp.c | 2 +- t/29_cppcomments.t | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dbdimp.c b/dbdimp.c index a8e96fb..0ede7c6 100644 --- a/dbdimp.c +++ b/dbdimp.c @@ -10,7 +10,7 @@ DBISTATE_DECLARE; * Debug Macros *-----------------------------------------------------*/ -#define DBD_SQLITE_CROAK_DEBUG +#undef DBD_SQLITE_CROAK_DEBUG #ifdef DBD_SQLITE_CROAK_DEBUG #define croak_if_db_is_null() if (!imp_dbh->db) croak("imp_dbh->db is NULL at line %d in %s", __LINE__, __FILE__) diff --git a/t/29_cppcomments.t b/t/29_cppcomments.t index f92ba31..951234a 100644 --- a/t/29_cppcomments.t +++ b/t/29_cppcomments.t @@ -31,6 +31,11 @@ foreach my $file (@c_files) { next FILE; } } + + if (/#define\s+DBD_SQLITE_CROAK_DEBUG/) { + fail("debug macro is enabled in $file line $line"); + next FILE; + } } pass("$file has no C++ comments"); close(F);