summaryrefslogtreecommitdiffstats
path: root/src/bindings/ingen.i
diff options
context:
space:
mode:
Diffstat (limited to 'src/bindings/ingen.i')
-rw-r--r--src/bindings/ingen.i28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/bindings/ingen.i b/src/bindings/ingen.i
index e9a13dc3..dbf5ab10 100644
--- a/src/bindings/ingen.i
+++ b/src/bindings/ingen.i
@@ -4,16 +4,12 @@
#include "../common/interface/ClientInterface.hpp"
#include "../common/interface/EngineInterface.hpp"
#include "../libs/module/World.hpp"
-#include "../libs/module/module.h"
+/*#include "../libs/module/module.h"*/
+#include "ingen_bindings.hpp"
namespace Ingen { namespace Shared {
class World;
} }
-typedef Ingen::Shared::World World;
-/*struct World {
- World() { me = Ingen::Shared::get_world(); }
- Ingen::Shared::World* me;
-};*/
%}
/*%ignore Ingen::Shared::EngineInterface;*/
@@ -22,18 +18,28 @@ typedef Ingen::Shared::World World;
%include "../common/interface/EngineInterface.hpp"
/*%include "../libs/module/World.hpp"
%include "../libs/module/module.h"*/
-%include "../libs/module/module.h"
+%include "../libs/module/World.hpp"
+//%include "../libs/module/module.h"
+%include "ingen_bindings.hpp"
using namespace Ingen::Shared;
namespace Ingen { namespace Shared {
class World;
} }
-%typedef Ingen::Shared::World World;
-/*struct World {};*/
+typedef Ingen::Shared::World World;
+namespace Ingen { namespace Shared {
%extend World {
- World() { return Ingen::Shared::get_world(); }
+ World() {
+ if (!Ingen::Shared::ingen_world) {
+ fprintf(stderr, "ERROR: World uninitialized (running within Ingen?)\n");
+ abort();
+ } else {
+ return Ingen::Shared::ingen_world;
+ }
+ }
/*SLV2World slv2() { return $self->me->slv2_world; }*/
+};
+} }
/*SharedPtr<Ingen::Shared::EngineInterface> engine() { return $self->me->engine; }*/
-};