Fixed a bug on Ubuntu 10.04

This commit is contained in:
Ferdinand Majerech 2012-03-23 19:57:57 +01:00
parent 206499a399
commit fdceb1bdcb
2 changed files with 4 additions and 28 deletions

View file

@ -113,18 +113,6 @@ struct Dumper
} }
private: private:
///Resolver used by default.
static Resolver defaultResolver_;
///Representer used by default.
static Representer defaultRepresenter_;
static this()
{
defaultResolver_ = new Resolver;
defaultRepresenter_ = new Representer;
}
///Resolver to resolve tags. ///Resolver to resolve tags.
Resolver resolver_; Resolver resolver_;
///Representer to represent data types. ///Representer to represent data types.
@ -181,8 +169,8 @@ struct Dumper
///Construct a Dumper writing to a _stream. This is useful to e.g. write to memory. ///Construct a Dumper writing to a _stream. This is useful to e.g. write to memory.
this(Stream stream) this(Stream stream)
{ {
resolver_ = defaultResolver_; resolver_ = new Resolver();
representer_ = defaultRepresenter_; representer_ = new Representer();
stream_ = stream; stream_ = stream;
} }

View file

@ -88,18 +88,6 @@ import dyaml.token;
struct Loader struct Loader
{ {
private: private:
///Resolver used by default.
static Resolver defaultResolver_;
///Constructor used by default.
static Constructor defaultConstructor_;
static this()
{
defaultResolver_ = new Resolver;
defaultConstructor_ = new Constructor;
}
///Reads character data from a stream. ///Reads character data from a stream.
Reader reader_; Reader reader_;
///Processes character data to YAML tokens. ///Processes character data to YAML tokens.
@ -152,8 +140,8 @@ struct Loader
reader_ = new Reader(stream); reader_ = new Reader(stream);
scanner_ = new Scanner(reader_); scanner_ = new Scanner(reader_);
parser_ = new Parser(scanner_); parser_ = new Parser(scanner_);
resolver_ = defaultResolver_; resolver_ = new Resolver();
constructor_ = defaultConstructor_; constructor_ = new Constructor();
} }
catch(YAMLException e) catch(YAMLException e)
{ {