Rename using => using_namespaces
This commit is contained in:
committed by
Emilio Cobos Álvarez
parent
4bd7b07d2f
commit
f1433bd3b9
@@ -217,8 +217,8 @@ impl Bindings {
|
||||
}
|
||||
|
||||
if self.config.language == Language::Cxx || self.config.cpp_compat {
|
||||
if let Some(ref using) = self.config.using {
|
||||
for namespace in using {
|
||||
if let Some(ref using_namespaces) = self.config.using_namespaces {
|
||||
for namespace in using_namespaces {
|
||||
out.new_line();
|
||||
write!(out, "using namespace {};", namespace);
|
||||
}
|
||||
|
||||
@@ -621,8 +621,8 @@ pub struct Config {
|
||||
pub namespace: Option<String>,
|
||||
/// An optional list of namespaces. Only applicable when language="C++"
|
||||
pub namespaces: Option<Vec<String>>,
|
||||
/// An optional list of namespaces to ddeclare as using. Only applicable when language="C++"
|
||||
pub using: Option<Vec<String>>,
|
||||
/// An optional list of namespaces to declare as using. Only applicable when language="C++"
|
||||
pub using_namespaces: Option<Vec<String>>,
|
||||
/// The style to use for braces
|
||||
pub braces: Braces,
|
||||
/// The preferred length of a line, used for auto breaking function arguments
|
||||
@@ -674,7 +674,7 @@ impl Default for Config {
|
||||
no_includes: false,
|
||||
namespace: None,
|
||||
namespaces: None,
|
||||
using: None,
|
||||
using_namespaces: None,
|
||||
braces: Braces::SameLine,
|
||||
line_length: 100,
|
||||
tab_width: 2,
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include <cstdlib>
|
||||
#include <new>
|
||||
|
||||
namespace root {
|
||||
|
||||
using namespace std;
|
||||
|
||||
extern "C" {
|
||||
@@ -10,3 +12,5 @@ extern "C" {
|
||||
void root();
|
||||
|
||||
} // extern "C"
|
||||
|
||||
} // namespace root
|
||||
@@ -1 +0,0 @@
|
||||
using = ["std"]
|
||||
@@ -0,0 +1,2 @@
|
||||
namespaces = ["root"]
|
||||
using_namespaces = ["std"]
|
||||
Reference in New Issue
Block a user