CAPI - use size_t for size_approx

This commit is contained in:
Chadwick Boulay
2021-10-25 18:30:56 -04:00
parent c144e9f376
commit 263e7b4943
2 changed files with 5 additions and 3 deletions

View File

@@ -31,9 +31,9 @@ int moodycamel_cq_try_dequeue(MoodycamelCQHandle handle, MoodycamelValue* value)
return reinterpret_cast<MoodycamelCQPtr>(handle)->try_dequeue(*value) ? 1 : 0;
}
unsigned int moodycamel_cq_size_approx(MoodycamelCQHandle handle)
size_t moodycamel_cq_size_approx(MoodycamelCQHandle handle)
{
return (unsigned int)reinterpret_cast<MoodycamelCQPtr>(handle)->size_approx();
return reinterpret_cast<MoodycamelCQPtr>(handle)->size_approx();
}
}

View File

@@ -1,5 +1,7 @@
#pragma once
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
@@ -26,7 +28,7 @@ MOODYCAMEL_EXPORT int moodycamel_cq_create(MoodycamelCQHandle* handle);
MOODYCAMEL_EXPORT int moodycamel_cq_destroy(MoodycamelCQHandle handle);
MOODYCAMEL_EXPORT int moodycamel_cq_enqueue(MoodycamelCQHandle handle, MoodycamelValue value);
MOODYCAMEL_EXPORT int moodycamel_cq_try_dequeue(MoodycamelCQHandle handle, MoodycamelValue* value);
MOODYCAMEL_EXPORT unsigned int moodycamel_cq_size_approx(MoodycamelCQHandle handle);
MOODYCAMEL_EXPORT size_t moodycamel_cq_size_approx(MoodycamelCQHandle handle);
MOODYCAMEL_EXPORT int moodycamel_bcq_create(MoodycamelBCQHandle* handle);
MOODYCAMEL_EXPORT int moodycamel_bcq_destroy(MoodycamelBCQHandle handle);