mirror of
https://github.com/cameron314/concurrentqueue.git
synced 2026-01-18 06:11:16 +01:00
CAPI - use size_t for size_approx
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user