Merge lp:~dobey/u1db/pkg-fixings into lp:u1db

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 379
Merged at revision: 378
Proposed branch: lp:~dobey/u1db/pkg-fixings
Merge into: lp:u1db
Diff against target: 91 lines (+25/-19)
4 files modified
src/CMakeLists.txt (+4/-1)
src/u1db.c (+1/-1)
src/u1db_query.c (+6/-5)
u1db/tests/c_backend_wrapper.pyx (+14/-12)
To merge this branch: bzr merge lp:~dobey/u1db/pkg-fixings
Reviewer Review Type Date Requested Status
Eric Casteleijn (community) Approve
Review via email: mp+119634@code.launchpad.net

Commit message

Fix license header in c_backend_wrapper.pyx
Set default CFLAGS so we get a debug build, and fail on compiler warnings
Only install the u1db.h file as a public include file
Fix some compiler warnings

To post a comment you must log in.
Revision history for this message
Eric Casteleijn (thisfred) wrote :

yay!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 2012-07-11 17:11:07 +0000
+++ src/CMakeLists.txt 2012-08-14 21:13:23 +0000
@@ -1,6 +1,9 @@
1cmake_minimum_required (VERSION 2.6)1cmake_minimum_required (VERSION 2.6)
2project (u1db)2project (u1db)
33
4# Some default CFLAGS
5SET (CMAKE_C_FLAGS "-O2 -g -Wall -Werror")
6
4# Allow specifying the libdir to use for the C library7# Allow specifying the libdir to use for the C library
5SET (LIB_SUFFIX "" CACHE STRING "Define suffix of library directory name.")8SET (LIB_SUFFIX "" CACHE STRING "Define suffix of library directory name.")
6SET (LIB_INSTALL_DIR "lib${LIB_SUFFIX}")9SET (LIB_INSTALL_DIR "lib${LIB_SUFFIX}")
@@ -34,5 +37,5 @@
34)37)
3538
36install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/u1db DESTINATION include39install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/u1db DESTINATION include
37 FILES_MATCHING PATTERN "*.h"40 FILES_MATCHING PATTERN "u1db.h"
38)41)
3942
=== modified file 'src/u1db.c'
--- src/u1db.c 2012-08-10 20:08:47 +0000
+++ src/u1db.c 2012-08-14 21:13:23 +0000
@@ -195,7 +195,7 @@
195u1db_set_document_size_limit(u1database *db, int limit)195u1db_set_document_size_limit(u1database *db, int limit)
196{196{
197 sqlite3_stmt *statement;197 sqlite3_stmt *statement;
198 int status, final_status;198 int status;
199199
200 status = sqlite3_prepare_v2(db->sql_handle,200 status = sqlite3_prepare_v2(db->sql_handle,
201 "INSERT OR REPLACE INTO u1db_config VALUES ('document_size_limit', ?)",201 "INSERT OR REPLACE INTO u1db_config VALUES ('document_size_limit', ?)",
202202
=== modified file 'src/u1db_query.c'
--- src/u1db_query.c 2012-08-09 20:46:13 +0000
+++ src/u1db_query.c 2012-08-14 21:13:23 +0000
@@ -245,11 +245,12 @@
245 int arity;245 int arity;
246 const int *value_types;246 const int *value_types;
247} OPERATIONS[] = {247} OPERATIONS[] = {
248 op_lower, "lower", json_type_string, 1, JUST_EXPRESSION,248 { op_lower, "lower", json_type_string, 1, JUST_EXPRESSION },
249 op_number, "number", json_type_int, 2, EXPRESSION_INTEGER,249 { op_number, "number", json_type_int, 2, EXPRESSION_INTEGER },
250 op_split_words, "split_words", json_type_string, 1, JUST_EXPRESSION,250 { op_split_words, "split_words", json_type_string, 1, JUST_EXPRESSION },
251 op_bool, "bool", json_type_boolean, 1, JUST_EXPRESSION,251 { op_bool, "bool", json_type_boolean, 1, JUST_EXPRESSION },
252 op_combine, "combine", json_type_string, -1, JUST_EXPRESSION};252 { op_combine, "combine", json_type_string, -1, JUST_EXPRESSION },
253};
253254
254static int255static int
255extract_value(json_object *val, int value_type, string_list *values)256extract_value(json_object *val, int value_type, string_list *values)
256257
=== modified file 'u1db/tests/c_backend_wrapper.pyx'
--- u1db/tests/c_backend_wrapper.pyx 2012-07-26 16:24:39 +0000
+++ u1db/tests/c_backend_wrapper.pyx 2012-08-14 21:13:23 +0000
@@ -1,17 +1,19 @@
1# Copyright 2011-2012 Canonical Ltd.1# Copyright 2011-2012 Canonical Ltd.
2#2#
3# This program is free software: you can redistribute it and/or modify it3# This file is part of u1db.
4# under the terms of the GNU General Public License version 3, as published4#
5# by the Free Software Foundation.5# u1db is free software: you can redistribute it and/or modify
6#6# it under the terms of the GNU Lesser General Public License version 3
7# This program is distributed in the hope that it will be useful, but7# as published by the Free Software Foundation.
8# WITHOUT ANY WARRANTY; without even the implied warranties of8#
9# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR9# u1db is distributed in the hope that it will be useful,
10# PURPOSE. See the GNU General Public License for more details.10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11#11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# You should have received a copy of the GNU General Public License along12# GNU Lesser General Public License for more details.
13# with this program. If not, see <http://www.gnu.org/licenses/>.13#
1414# You should have received a copy of the GNU Lesser General Public License
15# along with u1db. If not, see <http://www.gnu.org/licenses/>.
16#
15"""A Cython wrapper around the C implementation of U1DB Database backend."""17"""A Cython wrapper around the C implementation of U1DB Database backend."""
1618
17cdef extern from "Python.h":19cdef extern from "Python.h":

Subscribers

People subscribed via source and target branches