mirror of
https://github.com/janet-lang/janet
synced 2024-12-25 07:50:27 +00:00
Revert "Test removing 32bit ptr marshalling."
This reverts commit 566b45ea44
.
This commit is contained in:
parent
566b45ea44
commit
d7431c7cdb
@ -438,7 +438,7 @@ static void *janet_stream_unmarshal(JanetMarshalContext *ctx) {
|
|||||||
p->_mask = 0;
|
p->_mask = 0;
|
||||||
p->state = NULL;
|
p->state = NULL;
|
||||||
p->flags = (uint32_t) janet_unmarshal_int(ctx);
|
p->flags = (uint32_t) janet_unmarshal_int(ctx);
|
||||||
p->methods = janet_unmarshal_ptr(ctx);
|
p->methods = janet_unmarshal_ptr(ctx);
|
||||||
#ifdef JANET_WINDOWS
|
#ifdef JANET_WINDOWS
|
||||||
p->handle = (JanetHandle) janet_unmarshal_int64(ctx);
|
p->handle = (JanetHandle) janet_unmarshal_int64(ctx);
|
||||||
#else
|
#else
|
||||||
|
@ -364,7 +364,7 @@ void janet_marshal_int(JanetMarshalContext *ctx, int32_t value) {
|
|||||||
|
|
||||||
/* Only use in unsafe - don't marshal pointers otherwise */
|
/* Only use in unsafe - don't marshal pointers otherwise */
|
||||||
void janet_marshal_ptr(JanetMarshalContext *ctx, const void *ptr) {
|
void janet_marshal_ptr(JanetMarshalContext *ctx, const void *ptr) {
|
||||||
#ifdef JANET_32_DONTUSE
|
#ifdef JANET_32
|
||||||
janet_marshal_int(ctx, (intptr_t) ptr);
|
janet_marshal_int(ctx, (intptr_t) ptr);
|
||||||
#else
|
#else
|
||||||
janet_marshal_int64(ctx, (intptr_t) ptr);
|
janet_marshal_int64(ctx, (intptr_t) ptr);
|
||||||
@ -1176,7 +1176,7 @@ int64_t janet_unmarshal_int64(JanetMarshalContext *ctx) {
|
|||||||
|
|
||||||
void *janet_unmarshal_ptr(JanetMarshalContext *ctx) {
|
void *janet_unmarshal_ptr(JanetMarshalContext *ctx) {
|
||||||
UnmarshalState *st = (UnmarshalState *)(ctx->u_state);
|
UnmarshalState *st = (UnmarshalState *)(ctx->u_state);
|
||||||
#ifdef JANET_32_DONTUSE
|
#ifdef JANET_32
|
||||||
return (void *) ((intptr_t) readint(st, &(ctx->data)));
|
return (void *) ((intptr_t) readint(st, &(ctx->data)));
|
||||||
#else
|
#else
|
||||||
return (void *) ((intptr_t) read64(st, &(ctx->data)));
|
return (void *) ((intptr_t) read64(st, &(ctx->data)));
|
||||||
|
Loading…
Reference in New Issue
Block a user