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

Respect remove_underscores config when prefixing name to enum #708

Closed
wants to merge 2 commits into from

Conversation

adamski
Copy link
Contributor

@adamski adamski commented Aug 10, 2021

This closes #705

I am not able to run the tests here on my Mac using clang.

However, I've confirmed this fixes the issue for our project.

Here some some of the suggested changes for test cases:


diff --git a/tests/expectations/mangle.c b/tests/expectations/mangle.c
index 4da7082..d58bc58 100644
--- a/tests/expectations/mangle.c
+++ b/tests/expectations/mangle.c
@@ -10,3 +10,8 @@ typedef struct {
 typedef FooU8 Boo;
 
 void root(Boo x);
+
+typedef enum Bar {
+  BarSome,
+  BarThing,
+} Bar;
diff --git a/tests/expectations/mangle.tag.pyx b/tests/expectations/mangle.tag.pyx
index d362ca8..8542651 100644
--- a/tests/expectations/mangle.tag.pyx
+++ b/tests/expectations/mangle.tag.pyx
@@ -12,3 +12,7 @@ cdef extern from *:
   ctypedef FooU8 Boo;
 
   void root(Boo x);
+
+  ctypedef enum Bar:
+    BarSome,
+    BarThing;
diff --git a/tests/rust/mangle.rs b/tests/rust/mangle.rs
index b4aa46d..ef0124c 100644
--- a/tests/rust/mangle.rs
+++ b/tests/rust/mangle.rs
@@ -9,3 +9,9 @@ pub type Boo = Foo<u8>;
 pub extern "C" fn root(
     x: Boo,
 ) { }
+
+
+pub enum Bar {
+    Some,
+    Thing,
+}

@emilio
Copy link
Collaborator

emilio commented Aug 24, 2021

Sorry for the lag, this looks good. Will merge with a test asap.

@emilio emilio closed this in cbd4260 Aug 24, 2021
emilio added a commit that referenced this pull request Aug 24, 2021
@adamski
Copy link
Contributor Author

adamski commented Aug 24, 2021

Thanks @emilio !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

export.mangle remove_underscores not respected for enums
2 participants