mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-17 03:03:24 +02:00
Support MSVC cli.
MSVC CLI defined their own nullptr and provides for __nullptr for standard C++11. https://msdn.microsoft.com/en-us/library/4ex65770.aspx msgpack-c introduce MSGPACK_NULLPTR for internal use, it is defined as __nullptr only if compiled on C++ CLI otherwise defined as nullptr.
This commit is contained in:
@@ -27,7 +27,7 @@ class zone {
|
||||
void* m_data;
|
||||
};
|
||||
struct finalizer_array {
|
||||
finalizer_array():m_tail(nullptr), m_end(nullptr), m_array(nullptr) {}
|
||||
finalizer_array():m_tail(MSGPACK_NULLPTR), m_end(MSGPACK_NULLPTR), m_array(MSGPACK_NULLPTR) {}
|
||||
void call() {
|
||||
finalizer* fin = m_tail;
|
||||
for(; fin != m_array; --fin) (*(fin-1))();
|
||||
@@ -93,7 +93,7 @@ class zone {
|
||||
m_head = c;
|
||||
m_free = chunk_size;
|
||||
m_ptr = reinterpret_cast<char*>(c) + sizeof(chunk);
|
||||
c->m_next = nullptr;
|
||||
c->m_next = MSGPACK_NULLPTR;
|
||||
}
|
||||
~chunk_list()
|
||||
{
|
||||
@@ -117,7 +117,7 @@ class zone {
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_head->m_next = nullptr;
|
||||
m_head->m_next = MSGPACK_NULLPTR;
|
||||
m_free = chunk_size;
|
||||
m_ptr = reinterpret_cast<char*>(m_head) + sizeof(chunk);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user