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

Update ammo.idl to use sequences instead of arrays #263

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wingo
Copy link

@wingo wingo commented Jun 24, 2019

See emscripten-core/emscripten#8849.

This does change the generated .cpp file, but only marginally:

diff --git a/ammo.cpp b/ammo.cpp
index 5e59685..146b1ba 100644
--- a/ammo.cpp
+++ b/ammo.cpp
@@ -8,7 +8,7 @@ public:
       var self = Module['getCache'](Module['ConcreteContactResultCallback'])[$0];
       if (!self.hasOwnProperty('addSingleResult')) throw 'a JSImplementation must implement all functions, you forgot ConcreteContactResultCallback::addSingleResult.';
       return self['addSingleResult']($1,$2,$3,$4,$5,$6,$7);
-    }, (int)this, (int)&arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+    }, (int)this, (int)&arg0, (int)arg1, arg2, arg3, (int)arg4, arg5, arg6);
   }
   void __destroy__()  {
     EM_ASM_INT({
@@ -26,14 +26,14 @@ public:
       var self = Module['getCache'](Module['DebugDrawer'])[$0];
       if (!self.hasOwnProperty('drawLine')) throw 'a JSImplementation must implement all functions, you forgot DebugDrawer::drawLine.';
       self['drawLine']($1,$2,$3);
-    }, (int)this, &arg0, &arg1, &arg2);
+    }, (int)this, (int)&arg0, (int)&arg1, (int)&arg2);
   }
   void drawContactPoint(const btVector3& arg0, const btVector3& arg1, float arg2, int arg3, const btVector3& arg4)  {
     EM_ASM_INT({
       var self = Module['getCache'](Module['DebugDrawer'])[$0];
       if (!self.hasOwnProperty('drawContactPoint')) throw 'a JSImplementation must implement all functions, you forgot DebugDrawer::drawContactPoint.';
       self['drawContactPoint']($1,$2,$3,$4,$5);
-    }, (int)this, &arg0, &arg1, arg2, arg3, &arg4);
+    }, (int)this, (int)&arg0, (int)&arg1, arg2, arg3, (int)&arg4);
   }
   void reportErrorWarning(const char* arg0)  {
     EM_ASM_INT({
@@ -47,7 +47,7 @@ public:
       var self = Module['getCache'](Module['DebugDrawer'])[$0];
       if (!self.hasOwnProperty('draw3dText')) throw 'a JSImplementation must implement all functions, you forgot DebugDrawer::draw3dText.';
       self['draw3dText']($1,$2);
-    }, (int)this, &arg0, arg1);
+    }, (int)this, (int)&arg0, arg1);
   }
   void setDebugMode(int arg0)  {
     EM_ASM_INT({

@kripken
Copy link
Owner

kripken commented Sep 22, 2020

Sorry for missing this PR @wingo ! I don't have much time for this project I'm afraid 😢

Is this still relevant?

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.

None yet

2 participants