Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on nightly #1

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ extern {
}

pub type Encoding = c_void;
pub static ENCODING_UTF8: &'static Encoding = &OnigEncodingUTF8;
pub static ENCODING_UTF8: &'static Encoding = unsafe { &OnigEncodingUTF8 };
20 changes: 10 additions & 10 deletions src/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,25 @@ extern {
}

/// Plain text syntax
pub static SYNTAX_ASIS: &'static Syntax = &OnigSyntaxASIS;
pub static SYNTAX_ASIS: &'static Syntax = unsafe { &OnigSyntaxASIS };
/// POSIX Basic RE syntax
pub static SYNTAX_POSIX_BASIC: &'static Syntax = &OnigSyntaxPosixBasic;
pub static SYNTAX_POSIX_BASIC: &'static Syntax = unsafe { &OnigSyntaxPosixBasic };
/// POSIX Extended RE syntax
pub static SYNTAX_POSIX_EXTENDED: &'static Syntax = &OnigSyntaxPosixExtended;
pub static SYNTAX_POSIX_EXTENDED: &'static Syntax = unsafe { &OnigSyntaxPosixExtended };
/// Emacs syntax
pub static SYNTAX_EMACS: &'static Syntax = &OnigSyntaxEmacs;
pub static SYNTAX_EMACS: &'static Syntax = unsafe { &OnigSyntaxEmacs };
/// Grep syntax
pub static SYNTAX_GREP: &'static Syntax = &OnigSyntaxGrep;
pub static SYNTAX_GREP: &'static Syntax = unsafe { &OnigSyntaxGrep };
/// GNU regex syntax
pub static SYNTAX_GNU_REGEX: &'static Syntax = &OnigSyntaxGnuRegex;
pub static SYNTAX_GNU_REGEX: &'static Syntax = unsafe { &OnigSyntaxGnuRegex };
/// Java (Sun java.util.regex) syntax
pub static SYNTAX_JAVA: &'static Syntax = &OnigSyntaxJava;
pub static SYNTAX_JAVA: &'static Syntax = unsafe { &OnigSyntaxJava };
/// Perl syntax
pub static SYNTAX_PERL: &'static Syntax = &OnigSyntaxPerl;
pub static SYNTAX_PERL: &'static Syntax = unsafe { &OnigSyntaxPerl };
/// Perl + named group syntax
pub static SYNTAX_PERL_NG: &'static Syntax = &OnigSyntaxPerl_NG;
pub static SYNTAX_PERL_NG: &'static Syntax = unsafe { &OnigSyntaxPerl_NG };
/// Ruby syntax (default)
pub static SYNTAX_RUBY: &'static Syntax = &OnigSyntaxRuby;
pub static SYNTAX_RUBY: &'static Syntax = unsafe { &OnigSyntaxRuby };


type OnigCodePoint = c_ulong;
Expand Down