Comment: | Rename project to ObjSQLite3 |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
b821df3a30cc9a96f4d9ef2e3e354396 |
User & Date: | js on 2020-08-31 21:33:32 |
Other Links: | manifest | tags |
2020-08-31
| ||
21:36 | Makefile: Fix wrong name for .oc file check-in: c256c8ae6e user: js tags: trunk | |
21:33 | Rename project to ObjSQLite3 check-in: b821df3a30 user: js tags: trunk | |
2020-08-24
| ||
21:44 | Initial commit check-in: 5e202503fc user: js tags: trunk | |
Modified Makefile from [f67b2d2366] to [6e72bff737].
1 | SUBDIRS = src | | | 1 2 3 4 5 6 7 8 9 | SUBDIRS = src DISTCLEAN = ObjSQLite3.oc \ aclocal.m4 \ autom4te.cache \ buildsys.mk \ config.h \ config.log \ config.status \ extra.mk |
︙ | ︙ |
Renamed and modified ObjSQLite.oc.in [b203d785ac] to ObjSQLite3.oc.in [688d34c7ff].
1 | package_format 1 | | | | 1 2 3 | package_format 1 CPPFLAGS="$CPPFLAGS @SQLITE3_CPPFLAGS@" LIBS="-lobjsqlite3 @SQLITE3_LIBS@ $LIBS" |
Modified configure.ac from [d62e0a3619] to [735b3a5ce7].
|
| | | 1 2 3 4 5 6 7 8 | AC_INIT(ObjSQLite3, 0.1, js@nil.im) AC_CONFIG_SRCDIR(src) AC_CONFIG_AUX_DIR(build-aux) AC_CONFIG_MACRO_DIR(build-aux/m4) for i in configure.ac build-aux/m4/*; do AS_IF([test $i -nt configure], [ AC_MSG_ERROR([$i is newer than configure! Run ./autogen.sh!]) |
︙ | ︙ | |||
36 37 38 39 40 41 42 | AC_CHECK_TOOL(AR, ar) AC_PROG_RANLIB AC_ARG_ENABLE(shared, AS_HELP_STRING([--disable-shared], [do not build shared library])) AS_IF([test x"$enable_shared" != x"no"], [ BUILDSYS_SHARED_LIB | | | | | | | | | | | | | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | AC_CHECK_TOOL(AR, ar) AC_PROG_RANLIB AC_ARG_ENABLE(shared, AS_HELP_STRING([--disable-shared], [do not build shared library])) AS_IF([test x"$enable_shared" != x"no"], [ BUILDSYS_SHARED_LIB AC_SUBST(OBJSQLITE3_SHARED_LIB, "${LIB_PREFIX}objsqlite3${LIB_SUFFIX}") AC_SUBST(EXCEPTIONS_LIB_A, "exceptions.lib.a") AC_SUBST(EXCEPTIONS_EXCEPTIONS_LIB_A, "exceptions/exceptions.lib.a") BUILDSYS_FRAMEWORK([ AC_SUBST(OBJSQLITE3_FRAMEWORK, "ObjSQLite3.framework") ]) ]) AC_ARG_ENABLE(static, AS_HELP_STRING([--enable-static], [build static library])) AS_IF([test x"$enable_static" = x"yes" -o x"$enable_shared" = x"no"], [ AC_SUBST(OBJSQLITE3_STATIC_LIB, "libobjsqlite3.a") AC_SUBST(EXCEPTIONS_A, "exceptions.a") AC_SUBST(EXCEPTIONS_EXCEPTIONS_A, "exceptions/exceptions.a") ]) AC_ARG_WITH(sqlite3, AS_HELP_STRING([--with-sqlite3=PREFIX], [build with SQLite3 in the specified prefix])) AS_IF([test x"$with_sqlite3" != x"no" -a x"$with_sqlite3" != x""], [ SQLITE3_CPPFLAGS="-I$with_sqlite3/include" SQLITE3_LIBS="-L$with_sqlite3/lib" CPPFLAGS="$CPPFLAGS $SQLITE3_CPPFLAGS" LIBS="$LIBS $SQLITE3_LIBS" ]) AC_CHECK_LIB(sqlite3, main, [ SQLITE3_LIBS="$SQLITE3_LIBS -lsqlite3" LIBS="$LIBS -lsqlite3" ], [ AC_MSG_ERROR(You need SQLite3 and installed!) ]) AS_IF([test x"$GOBJC" = x"yes"], [ OBJCFLAGS="$OBJCFLAGS -Wall -Werror -Wwrite-strings -Wpointer-arith" |
︙ | ︙ | |||
106 107 108 109 110 111 112 | ]) dnl We don't call AC_PROG_CPP, but only AC_PROG_OBJCPP and set CPP to OBJCPP dnl and add OBJCPPFLAGS to CPPFLAGS, thus we need to AC_SUBST these ourself. AC_SUBST(CPP) AC_SUBST(CPPFLAGS) | | | | | 106 107 108 109 110 111 112 113 114 115 116 117 | ]) dnl We don't call AC_PROG_CPP, but only AC_PROG_OBJCPP and set CPP to OBJCPP dnl and add OBJCPPFLAGS to CPPFLAGS, thus we need to AC_SUBST these ourself. AC_SUBST(CPP) AC_SUBST(CPPFLAGS) AC_SUBST(SQLITE3_CPPFLAGS) AC_SUBST(SQLITE3_LIBS) AC_CONFIG_FILES([buildsys.mk extra.mk ObjSQLite3.oc]) AC_OUTPUT |
Modified extra.mk.in from [486df64972] to [ff9c428f67].
|
| | | | | 1 2 3 4 5 6 7 8 9 10 | OBJSQLITE3_SHARED_LIB = @OBJSQLITE3_SHARED_LIB@ OBJSQLITE3_STATIC_LIB = @OBJSQLITE3_STATIC_LIB@ OBJSQLITE3_FRAMEWORK = @OBJSQLITE3_FRAMEWORK@ EXCEPTIONS_A = @EXCEPTIONS_A@ EXCEPTIONS_EXCEPTIONS_A = @EXCEPTIONS_EXCEPTIONS_A@ EXCEPTIONS_EXCEPTIONS_LIB_A = @EXCEPTIONS_EXCEPTIONS_LIB_A@ EXCEPTIONS_LIB_A = @EXCEPTIONS_LIB_A@ OBJFW_FRAMEWORK_LIBS = @OBJFW_FRAMEWORK_LIBS@ OBJFW_LIBS = @OBJFW_LIBS@ |
Modified src/Makefile from [cdf3bb1ec3] to [b2a42d910b].
1 2 3 4 | include ../extra.mk SUBDIRS = exceptions | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | include ../extra.mk SUBDIRS = exceptions SHARED_LIB = ${OBJSQLITE3_SHARED_LIB} STATIC_LIB = ${OBJSQLITE3_STATIC_LIB} FRAMEWORK = ${OBJSQLITE3_FRAMEWORK} LIB_MAJOR = 0 LIB_MINOR = 0 SRCS = SL3Connection.m INCLUDES := ${SRCS:.m=.h} \ ObjSQLite3.h OBJS_EXTRA = ${EXCEPTIONS_EXCEPTIONS_A} LIB_OBJS_EXTRA = ${EXCEPTIONS_EXCEPTIONS_LIB_A} include ../buildsys.mk CPPFLAGS += -I. -Iexceptions |
︙ | ︙ |
Renamed and modified src/ObjSQLite.h [d1234b0221] to src/ObjSQLite3.h [8bfc55c8f4].
1 2 3 | /* * Copyright (c) 2020, Jonathan Schleifer <js@nil.im> * | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | /* * Copyright (c) 2020, Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/objsqlite3 * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import "SL3Connection.h" |
Renamed and modified src/SLConnection.h [1ce8856dcf] to src/SL3Connection.h [d61a9f733e].
1 2 3 | /* * Copyright (c) 2020, Jonathan Schleifer <js@nil.im> * | | | 1 2 3 4 5 6 7 8 9 10 11 | /* * Copyright (c) 2020, Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/objsqlite3 * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
︙ | ︙ | |||
22 23 24 25 26 27 28 | #import <ObjFW/ObjFW.h> #include <sqlite3.h> OF_ASSUME_NONNULL_BEGIN | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #import <ObjFW/ObjFW.h> #include <sqlite3.h> OF_ASSUME_NONNULL_BEGIN @interface SL3Connection: OFObject { sqlite3 *_database; } + (instancetype)connectionWithPath: (OFString *)path flags: (int)flags; - (instancetype)initWithPath: (OFString *)path flags: (int)flags; @end OF_ASSUME_NONNULL_END |
Renamed and modified src/SLConnection.m [6c201cd34d] to src/SL3Connection.m [05894e3c52].
1 2 3 | /* * Copyright (c) 2020, Jonathan Schleifer <js@nil.im> * | | | | | | > | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | /* * Copyright (c) 2020, Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/objsqlite3 * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import "SL3Connection.h" #import "SL3Exception.h" @implementation SL3Connection + (instancetype)connectionWithPath: (OFString *)path flags: (int)flags { return [[[self alloc] initWithPath: path flags: flags] autorelease]; } - (instancetype)initWithPath: (OFString *)path flags: (int)flags { self = [super init]; @try { int errorCode = sqlite3_open_v2(path.UTF8String, &_database, flags, NULL); if (errorCode != SQLITE_OK) /* TODO: Use an SL3Exception subclass. */ @throw [SL3Exception exceptionWithConnection: nil errorCode: errorCode]; } @catch (id e) { [self release]; @throw e; } return self; } |
︙ | ︙ |
Modified src/exceptions/Makefile from [a63d26e3c5] to [1415e43b6a].
1 2 3 4 5 | include ../../extra.mk STATIC_PIC_LIB_NOINST = ${EXCEPTIONS_LIB_A} STATIC_LIB_NOINST = ${EXCEPTIONS_A} | | | 1 2 3 4 5 6 7 8 9 10 11 12 | include ../../extra.mk STATIC_PIC_LIB_NOINST = ${EXCEPTIONS_LIB_A} STATIC_LIB_NOINST = ${EXCEPTIONS_A} SRCS = SL3Exception.m INCLUDES = ${SRCS:.m=.h} include ../../buildsys.mk CPPFLAGS += -I. -I.. |
Renamed and modified src/exceptions/SLException.h [d2f9f591c1] to src/exceptions/SL3Exception.h [cb96ce679b].
1 2 3 | /* * Copyright (c) 2020, Jonathan Schleifer <js@nil.im> * | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | /* * Copyright (c) 2020, Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/objsqlite3 * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import <ObjFW/ObjFW.h> #import "SL3Connection.h" OF_ASSUME_NONNULL_BEGIN @interface SL3Exception: OFException { SL3Connection *_connection; int _errorCode; } @property OF_NULLABLE_PROPERTY (readonly, nonatomic) SL3Connection *connection; @property (readonly, nonatomic) int errorCode; + (instancetype)exceptionWithConnection: (nullable SL3Connection *)connection errorCode: (int)errorCode; - (instancetype)initWithConnection: (nullable SL3Connection *)connection errorCode: (int)errorCode OF_DESIGNATED_INITIALIZER; @end OF_ASSUME_NONNULL_END |
Renamed and modified src/exceptions/SLException.m [2d25da858b] to src/exceptions/SL3Exception.m [a42eeef0e9].
1 2 3 | /* * Copyright (c) 2020, Jonathan Schleifer <js@nil.im> * | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | /* * Copyright (c) 2020, Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/objsqlite3 * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import "SL3Exception.h" @implementation SL3Exception @synthesize connection = _connection, errorCode = _errorCode; + (instancetype)exceptionWithConnection: (SL3Connection *)connection errorCode: (int)errorCode { return [[[self alloc] initWithConnection: connection errorCode: errorCode] autorelease]; } - (instancetype)initWithConnection: (SL3Connection *)connection errorCode: (int)errorCode { self = [super init]; _connection = [connection retain]; _errorCode = errorCode; |
︙ | ︙ |