ammo.js icon indicating copy to clipboard operation
ammo.js copied to clipboard

Update ammo.idl to use sequences instead of arrays

Open wingo opened this issue 6 years ago • 1 comments

See https://github.com/emscripten-core/emscripten/pull/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({

wingo avatar Jun 24 '19 08:06 wingo

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

Is this still relevant?

kripken avatar Sep 22 '20 00:09 kripken