Update for upstream changes

This commit is contained in:
Steven Fackler 2014-03-29 14:33:11 -07:00
parent 61f9f43cf3
commit 4adf743aeb
7 changed files with 19 additions and 29 deletions

2
configure vendored
View File

@ -25,5 +25,3 @@ git submodule update --init
sed -e "s|%PREFIX%|$PREFIX|" \
-e "s|%CONFIGURE_ARGS%|$CONFIGURE_ARGS|" \
< Makefile.in > Makefile
touch config.stamp

View File

@ -55,14 +55,14 @@ fn main() {
```
*/
#[crate_id="github.com/sfackler/rust-postgres#postgres:0.0"];
#[crate_type="rlib"];
#[crate_type="dylib"];
#[doc(html_root_url="http://www.rust-ci.org/sfackler/rust-postgres/doc")];
#![crate_id="github.com/sfackler/rust-postgres#postgres:0.0"]
#![crate_type="rlib"]
#![crate_type="dylib"]
#![doc(html_root_url="http://www.rust-ci.org/sfackler/rust-postgres/doc")]
#[warn(missing_doc)];
#![warn(missing_doc)]
#[feature(macro_rules, struct_variant, phase)];
#![feature(macro_rules, struct_variant, phase)]
extern crate collections;
extern crate openssl;
@ -386,7 +386,7 @@ impl Writer for InternalStream {
struct InnerPostgresConnection {
stream: BufferedStream<InternalStream>,
next_stmt_id: uint,
notice_handler: ~PostgresNoticeHandler,
notice_handler: ~PostgresNoticeHandler:Send,
notifications: RingBuf<PostgresNotification>,
cancel_data: PostgresCancelData,
unknown_types: HashMap<Oid, ~str>,
@ -436,7 +436,7 @@ impl InnerPostgresConnection {
let mut conn = InnerPostgresConnection {
stream: BufferedStream::new(stream),
next_stmt_id: 0,
notice_handler: ~DefaultNoticeHandler as ~PostgresNoticeHandler,
notice_handler: ~DefaultNoticeHandler,
notifications: RingBuf::new(),
cancel_data: PostgresCancelData { process_id: 0, secret_key: 0 },
unknown_types: HashMap::new(),
@ -551,8 +551,8 @@ impl InnerPostgresConnection {
}
}
fn set_notice_handler(&mut self, handler: ~PostgresNoticeHandler)
-> ~PostgresNoticeHandler {
fn set_notice_handler(&mut self, handler: ~PostgresNoticeHandler:Send)
-> ~PostgresNoticeHandler:Send {
mem::replace(&mut self.notice_handler, handler)
}
@ -728,8 +728,8 @@ impl PostgresConnection {
}
/// Sets the notice handler for the connection, returning the old handler.
pub fn set_notice_handler(&self, handler: ~PostgresNoticeHandler)
-> ~PostgresNoticeHandler {
pub fn set_notice_handler(&self, handler: ~PostgresNoticeHandler:Send)
-> ~PostgresNoticeHandler:Send {
self.conn.borrow_mut().set_notice_handler(handler)
}

View File

@ -769,7 +769,7 @@ fn test_custom_notice_handler() {
}
let conn = or_fail!(PostgresConnection::connect("postgres://postgres@localhost?client_min_messages=NOTICE", &NoSsl));
conn.set_notice_handler(~Handler as ~PostgresNoticeHandler);
conn.set_notice_handler(~Handler);
or_fail!(conn.execute("CREATE FUNCTION pg_temp.note() RETURNS INT AS $$
BEGIN
RAISE NOTICE 'note';

View File

@ -1,5 +1,5 @@
//! Traits dealing with Postgres data types
#[macro_escape];
#![macro_escape]
use collections::HashMap;
use uuid::Uuid;
@ -73,12 +73,12 @@ static RANGE_LOWER_INCLUSIVE: i8 = 0b0000_0010;
static RANGE_EMPTY: i8 = 0b0000_0001;
macro_rules! make_postgres_type(
($($doc:attr $oid:ident => $variant:ident $(member $member:ident)*),+) => (
($(#[$doc:meta] $oid:ident => $variant:ident $(member $member:ident)*),+) => (
/// A Postgres type
#[deriving(Eq, Clone, Show)]
pub enum PostgresType {
$(
$doc
#[$doc]
$variant,
)+
/// An unknown type
@ -504,14 +504,6 @@ impl FromSql for HashMap<~str, Option<~str>> {
ret.map(|ok| ok.unwrap())
}
}
macro_rules! or_fail(
($e:expr) => (
match $e {
Ok(ok) => ok,
Err(err) => fail!("{}", err)
}
)
)
/// A trait for types that can be converted into Postgres values
pub trait ToSql {

View File

@ -1,5 +1,5 @@
//! Types dealing with ranges of values
#[macro_escape];
#![macro_escape]
use std::fmt;
use std::i32;

@ -1 +1 @@
Subproject commit 761901d0e409304450a49d784bae989d125c68b2
Subproject commit bf2dadd7fba702c9706a457523e049d36ed8f10b

@ -1 +1 @@
Subproject commit 84aa16d16bdccaafd4246cd00fc92533c00c7551
Subproject commit ab0ea8271d87768519ef066f80f2d7981c558a17