Permalink
Browse files

Initalize more data on a new PMC

  • Loading branch information...
atrodo committed Mar 4, 2011
1 parent 340f919 commit e4c1b740f80b00fda9854a73c2040dbaae3a3eac
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);
/*

0 comments on commit e4c1b74

Please sign in to comment.