From e32dac1b4df3675033a9be21e33be46e60183bf4 Mon Sep 17 00:00:00 2001 From: Pascal Obry Date: Thu, 25 Feb 2010 15:36:22 +0100 Subject: [PATCH] Minor reformatting, add missing header. --- src/db-sqlite.adb | 10 +++++++--- tests/regtests.gpr | 22 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/db-sqlite.adb b/src/db-sqlite.adb index 95bfd9d..30fe25a 100644 --- a/src/db-sqlite.adb +++ b/src/db-sqlite.adb @@ -1,7 +1,7 @@ ------------------------------------------------------------------------------ -- GnadeLite -- -- -- --- Copyright (C) 2006-2008 -- +-- Copyright (C) 2006-2010 -- -- Pascal Obry - Olivier Ramonat -- -- -- -- This library is free software; you can redistribute it and/or modify -- @@ -116,6 +116,7 @@ package body DB.SQLite is begin if Error_Msg = Strings.Null_Ptr then return ""; + else Free : declare V : constant String := Strings.Value (Error_Msg); @@ -316,8 +317,9 @@ package body DB.SQLite is ---------- procedure Exec - (DB : in Handle; SQL : in String) is - SQL_Stat : Strings.chars_ptr := Strings.New_String (SQL); + (DB : in Handle; SQL : in String) + is + SQL_Stat : Strings.chars_ptr := Strings.New_String (SQL); Result : int; Error_Msg : Strings.chars_ptr; begin @@ -328,6 +330,7 @@ package body DB.SQLite is Check_Result ("Execute", Result, Error_Msg); -- Free + Strings.Free (SQL_Stat); end Exec; @@ -428,6 +431,7 @@ package body DB.SQLite is Strings.Free (zSql); return Select_Iter; end Prepare_Select; + end SQLite_Safe; ------------------- diff --git a/tests/regtests.gpr b/tests/regtests.gpr index cb9fe82..ca3b4a2 100644 --- a/tests/regtests.gpr +++ b/tests/regtests.gpr @@ -1,6 +1,28 @@ +------------------------------------------------------------------------------ +-- GnadeLite -- +-- -- +-- Copyright (C) 2008-2010 -- +-- Pascal Obry - Olivier Ramonat -- +-- -- +-- This library is free software; you can redistribute it and/or modify -- +-- it under the terms of the GNU General Public License as published by -- +-- the Free Software Foundation; either version 2 of the License, or (at -- +-- your option) any later version. -- +-- -- +-- This library is distributed in the hope that it will be useful, but -- +-- WITHOUT ANY WARRANTY; without even the implied warranty of -- +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- +-- General Public License for more details. -- +-- -- +-- You should have received a copy of the GNU General Public License -- +-- along with this library; if not, write to the Free Software Foundation, -- +-- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -- +------------------------------------------------------------------------------ + with "../gnadelite"; project Regtests is + for Source_Dirs use ("."); for Main use ("t1.adb", "t2.adb"); type Build_Type is ("Debug", "Release", "Profile"); -- 2.11.4.GIT