No need to construct a SmokeBinding per Smoke module.
src/libsmoke/smoke.cpp
Fri Feb 19 22:10:24 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* No need to construct a SmokeBinding per Smoke module.
--- old-smoke/src/libsmoke/smoke.cpp 2014-10-30 08:06:31.000000000 +0100
+++ new-smoke/src/libsmoke/smoke.cpp 2014-10-30 08:06:31.000000000 +0100
@@ -12,18 +12,6 @@
extern "C" {
-/** Returns the Smoke module of a Smoke binding.
- * @related cl_smoke::Binding
- * @param binding the Binding
- *
- * @return the Smoke module
- */
-CL_SMOKE_EXPORT void*
-cl_smoke_get_smoke(smoke_binding binding)
-{
- return static_cast<NoDispatchBinding*>(binding)->get_smoke();
-}
-
/** Creates a new Smoke binding.
* The binding is allocated on the heap an can be freed with smoke_destruct().
* When method dispatching is not needed, a null pointer can be passed for @a dispatch.
@@ -37,14 +25,12 @@
* @return a pointer to a new Smoke binding.
*/
CL_SMOKE_EXPORT smoke_binding
-cl_smoke_construct_binding(void* smoke, void* destruct, void* dispatch)
+cl_smoke_construct_binding(void* destruct, void* dispatch)
{
if (NULL == dispatch)
- return new NoDispatchBinding(static_cast<Smoke*>(smoke),
- reinterpret_cast<NoDispatchBinding::destructed>(destruct));
+ return new NoDispatchBinding(reinterpret_cast<NoDispatchBinding::destructed>(destruct));
else
- return new Binding(static_cast<Smoke*>(smoke),
- reinterpret_cast<NoDispatchBinding::destructed>(destruct),
+ return new Binding(reinterpret_cast<NoDispatchBinding::destructed>(destruct),
reinterpret_cast<Binding::dispatch_method>(dispatch));
}
@@ -198,7 +184,7 @@
/** Finds a method of a class.
* @param m pointer to write the result to
- * @param smoke the smoke binding
+ * @param smoke the smoke module
* @param class_index index of the class
* @param method_name method name
*/