Fixed a bug on Ubuntu 10.04
This commit is contained in:
parent
206499a399
commit
fdceb1bdcb
|
@ -113,18 +113,6 @@ struct Dumper
|
|||
}
|
||||
|
||||
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 resolver_;
|
||||
///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.
|
||||
this(Stream stream)
|
||||
{
|
||||
resolver_ = defaultResolver_;
|
||||
representer_ = defaultRepresenter_;
|
||||
resolver_ = new Resolver();
|
||||
representer_ = new Representer();
|
||||
stream_ = stream;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,18 +88,6 @@ import dyaml.token;
|
|||
struct Loader
|
||||
{
|
||||
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.
|
||||
Reader reader_;
|
||||
///Processes character data to YAML tokens.
|
||||
|
@ -152,8 +140,8 @@ struct Loader
|
|||
reader_ = new Reader(stream);
|
||||
scanner_ = new Scanner(reader_);
|
||||
parser_ = new Parser(scanner_);
|
||||
resolver_ = defaultResolver_;
|
||||
constructor_ = defaultConstructor_;
|
||||
resolver_ = new Resolver();
|
||||
constructor_ = new Constructor();
|
||||
}
|
||||
catch(YAMLException e)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue