Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Initalize more data on a new PMC

  • Loading branch information...
commit e4c1b740f80b00fda9854a73c2040dbaae3a3eac 1 parent 340f919
@atrodo authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  pmc.c
View
2  pmc.c
@@ -29,6 +29,7 @@ lorito_pmc_init(Lorito_Interp *interp, Lorito_PMC *target)
result->ptr_count = ((int) size / sizeof(void *)) / 2;
if (result->ptr_count < 4)
result->ptr_count = 4;
+ result->ptr_count = 0;
result->data = malloc(size);
result->ptrs = (Lorito_PMC **) malloc(result->ptr_count * sizeof(Lorito_PMC *));
}
@@ -42,6 +43,7 @@ lorito_pmc_new(Lorito_Interp *interp, int size)
Lorito_PMC *result = (Lorito_PMC *) malloc(sizeof(Lorito_PMC));
result->size = size;
+ result->internal_type = NOT_INTERNAL;
return lorito_pmc_init(interp, result);
/*
Please sign in to comment.
Something went wrong with that request. Please try again.