[PATCH 31/50] [avis] Windows Changes


Michael Schonberg <mschonberg@...>
 

From: Mike Schonberg <mschonberg@nyx.com>

Callbacks must be declared with the correct calling convention for Windows.

Signed-off-by: Mike Schonberg <mschonberg@nyx.com>
---
mama/c_cpp/src/c/bridge/avis/msg.c | 3 +--
mama/c_cpp/src/c/bridge/avis/queue.c | 2 +-
mama/c_cpp/src/c/bridge/avis/sub.c | 4 ++--
mama/c_cpp/src/c/bridge/avis/subinitial.c | 8 ++++----
mama/c_cpp/src/c/bridge/avis/timer.c | 4 ++--
5 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/mama/c_cpp/src/c/bridge/avis/msg.c b/mama/c_cpp/src/c/bridge/avis/msg.c
index b422543..c0553af 100644
--- a/mama/c_cpp/src/c/bridge/avis/msg.c
+++ b/mama/c_cpp/src/c/bridge/avis/msg.c
@@ -84,8 +84,7 @@ mama_status
avisBridgeMamaMsg_destroyMiddlewareMsg (msgBridge msg)
{
CHECK_MSG(msg);
- attributes_free(avisMsg(msg)->mAvisMsg);
- free(avisMsg(msg)->mAvisMsg);
+ attributes_destroy(avisMsg(msg)->mAvisMsg);
avisMsg(msg)->mAvisMsg = NULL;

return MAMA_STATUS_OK;
diff --git a/mama/c_cpp/src/c/bridge/avis/queue.c b/mama/c_cpp/src/c/bridge/avis/queue.c
index fd8c629..1e7263c 100644
--- a/mama/c_cpp/src/c/bridge/avis/queue.c
+++ b/mama/c_cpp/src/c/bridge/avis/queue.c
@@ -174,7 +174,7 @@ avisBridgeMamaQueue_dispatchEvent (queueBridge queue)
return MAMA_STATUS_OK;
}

-static void queueCb (void *ignored, void* closure)
+static void MAMACALLTYPE queueCb (void *ignored, void* closure)
{
avisQueueClosure* cl = (avisQueueClosure*)closure;
if (NULL ==cl) return;
diff --git a/mama/c_cpp/src/c/bridge/avis/sub.c b/mama/c_cpp/src/c/bridge/avis/sub.c
index 08fc697..5d0752d 100644
--- a/mama/c_cpp/src/c/bridge/avis/sub.c
+++ b/mama/c_cpp/src/c/bridge/avis/sub.c
@@ -72,7 +72,7 @@ const char* makeAvisSubject(const char* subject)
}


-static void
+static void MAMACALLTYPE
destroy_callback(void* subscriber, void* closure)
{
// cant do anything without a subscriber
@@ -92,7 +92,7 @@ destroy_callback(void* subscriber, void* closure)
* @param data The Avis Attributes* clone (must be freed)
* @param closure The subscriber
*/
-static void
+static void MAMACALLTYPE
avis_queue_callback (void* data, void* closure)
{
mama_status status;
diff --git a/mama/c_cpp/src/c/bridge/avis/subinitial.c b/mama/c_cpp/src/c/bridge/avis/subinitial.c
index 95c8ff3..7f58441 100644
--- a/mama/c_cpp/src/c/bridge/avis/subinitial.c
+++ b/mama/c_cpp/src/c/bridge/avis/subinitial.c
@@ -50,7 +50,7 @@ typedef struct avisInboxImpl
} while(0)


-static void
+static void MAMACALLTYPE
avisInbox_onMsg(
mamaSubscription subscription,
mamaMsg msg,
@@ -63,14 +63,14 @@ avisInbox_onMsg(
(avisInbox(closure)->mMsgCB)(msg, avisInbox(closure)->mClosure);
}

-static void
+static void MAMACALLTYPE
avisInbox_onCreate(
mamaSubscription subscription,
void* closure)
{
}

-static void
+static void MAMACALLTYPE
avisInbox_onDestroy(
mamaSubscription subscription,
void* closure)
@@ -81,7 +81,7 @@ avisInbox_onDestroy(
(avisInbox(closure)->mOnInboxDestroyed)(avisInbox(closure)->mParent, avisInbox(closure)->mClosure);
}

-static void
+static void MAMACALLTYPE
avisInbox_onError(
mamaSubscription subscription,
mama_status status,
diff --git a/mama/c_cpp/src/c/bridge/avis/timer.c b/mama/c_cpp/src/c/bridge/avis/timer.c
index 18aad31..4489ac6 100755
--- a/mama/c_cpp/src/c/bridge/avis/timer.c
+++ b/mama/c_cpp/src/c/bridge/avis/timer.c
@@ -42,7 +42,7 @@ typedef struct avisTimerImpl_
/* TODO: add queue */
} avisTimerImpl;

-static void
+static void MAMACALLTYPE
destroy_callback(void* timer, void* closure)
{
avisTimerImpl* impl = (avisTimerImpl*)timer;
@@ -51,7 +51,7 @@ destroy_callback(void* timer, void* closure)
free (impl);
}

-static void
+static void MAMACALLTYPE
timerQueueCb (void* data, void* closure)
{
avisTimerImpl* impl = (avisTimerImpl*)data;
--
1.7.7.6

Join Openmama-dev@lists.openmama.org to automatically receive all group messages.