You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.6 KiB
46 lines
1.6 KiB
14 years ago
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||
|
#
|
||
|
# Filename: package/.../specter/specter-1.4-0002-SQL-boolean.patch
|
||
|
# Copyright (C) 2011 The OpenSDE Project
|
||
|
#
|
||
|
# More information can be found in the files COPYING and README.
|
||
|
#
|
||
|
# This patch file is dual-licensed. It is available under the license the
|
||
|
# patched project is licensed under, as long as it is an OpenSource license
|
||
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or 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.
|
||
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
||
|
|
||
|
Description: Fixed SQL to use 'True' and 'False' for saving boolean values
|
||
|
Origin: Upstream (http://bazaar.launchpad.net/~ruby/specter/trunk/diff/4)
|
||
|
|
||
|
=== modified file 'plugins/sql.c'
|
||
|
--- specter-1.4/plugins/sql.c 2008-01-06 17:26:23 +0000
|
||
|
+++ specter-1.4/plugins/sql.c 2008-01-07 00:22:02 +0000
|
||
|
@@ -126,9 +126,9 @@
|
||
|
size_min += 16;
|
||
|
size_avg += 20; /* 18446744073709551615 */
|
||
|
break;
|
||
|
- case SPECTER_IRET_BOOL:
|
||
|
- size_min++;
|
||
|
- size_avg++;
|
||
|
+ case SPECTER_IRET_BOOL: /* string "True" of "False" */
|
||
|
+ size_min += 5;
|
||
|
+ size_avg += 5;
|
||
|
break;
|
||
|
case SPECTER_IRET_STRING:
|
||
|
size_min += 64;
|
||
|
@@ -265,7 +265,7 @@
|
||
|
break;
|
||
|
case SPECTER_IRET_BOOL:
|
||
|
buff += snprintf(buff, buff_end-buff,
|
||
|
- "%i,", f->iret->value.b);
|
||
|
+ f->iret->value.b ? "True, " : "False,");
|
||
|
break;
|
||
|
case SPECTER_IRET_STRING:
|
||
|
/* check if string is empty */
|
||
|
|