Skip to content

Instantly share code, notes, and snippets.

@alendit
alendit / mylib.c
Last active August 29, 2015 14:01
Apparent cffi bug
#include <stdlib.h>
#include <stdio.h>
#include "mylib.h"
/* initialize the array with integers 0...length */
void initialize_MyArray(MyArray* a, long length){
a->length = length;
a->arr = (int*)malloc(length * sizeof(int));
int i;
for(i=0; i<length; i++){