Permalink
Browse files

Add the "PMC" macro to cast quickly.

  • Loading branch information...
1 parent 389c75b commit a99e827f77d0c15487176f5a642e126150ac0f32 @atrodo committed Dec 14, 2010
Showing with 3 additions and 2 deletions.
  1. +2 −2 internal_pmc.c
  2. +1 −0 pmc.h
View
@@ -136,8 +136,8 @@ lorito_datadef_block_new(Lorito_Interp *interp, char *name, int length)
void *data = (void *) malloc(sizeof(Lorito_Opcode) * length);
Lorito_Datadefseg *result = (Lorito_Datadefseg *) malloc(sizeof(Lorito_Datadefseg));
- result->pmc.size = length;
- result->pmc.internal_type = DATA_BLOCK;
+ result->pmc.size = 0;
+ result->pmc.internal_type = CONST_BLOCK;
result->name = name;
result->length = length * sizeof(Lorito_Opcode);
result->data = data;
View
@@ -4,6 +4,7 @@
#define LORITO_PMC_H_GUARD
#define null interp->null_pmc
+#define PMC (Lorito_PMC *)
Lorito_PMC *
lorito_pmc_init(Lorito_Interp *interp, Lorito_PMC *target);

0 comments on commit a99e827

Please sign in to comment.