mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-11-07 13:01:01 +00:00
Fix compile error.
This commit is contained in:
parent
d44108c709
commit
8e850dca4a
2 changed files with 2 additions and 14 deletions
|
|
@ -15,18 +15,6 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
#if _MSC_VER
|
|
||||||
typedef signed char uint8_t;
|
|
||||||
typedef unsigned char uint8_t;
|
|
||||||
typedef short int16_t;
|
|
||||||
typedef unsigned short uint16_t;
|
|
||||||
typedef int int32_t;
|
|
||||||
typedef unsigned int uint32_t;
|
|
||||||
typedef long long int64_t;
|
|
||||||
typedef unsigned long long uint64_t;
|
|
||||||
#else
|
|
||||||
#include <stdint.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ using namespace std;
|
||||||
struct array_context {
|
struct array_context {
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
unsigned int last;
|
unsigned int last;
|
||||||
stack_item(unsigned int size) : size(size), last(0)
|
array_context(unsigned int size) : size(size), last(0)
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
struct unpack_user {
|
struct unpack_user {
|
||||||
|
|
@ -116,7 +116,7 @@ static inline int template_callback_false(unpack_user* u, msgpack_unpack_object*
|
||||||
static inline int template_callback_array(unpack_user* u, unsigned int n, msgpack_unpack_object* o)
|
static inline int template_callback_array(unpack_user* u, unsigned int n, msgpack_unpack_object* o)
|
||||||
{
|
{
|
||||||
if (n > 0) {
|
if (n > 0) {
|
||||||
u->array_stack.push(stack_item(n));
|
u->array_stack.push(array_context(n));
|
||||||
*o = PyList_New(n);
|
*o = PyList_New(n);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue