Skip to content

Instantly share code, notes, and snippets.

View flavius's full-sized avatar

Flavius Aspra flavius

View GitHub Profile
#include <stdlib.h>
#include <stdio.h>
#include "stack.h"
void push(struct node** first, struct node** addAfter, const char val){
struct node* top;
top = malloc(sizeof(struct node*));
top->val = val;
alsdkj alsdkasl
lksdfjsldk 1/1
1 2
#include <zend.h>
#include "php_demo.h"
PHP_METHOD(Bar, __construct) {
long three;
zval *four;
php_printf("%s called\n", __FUNCTION__);
if(FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l",
&three)) {
a
In file included from /usr/include/php/Zend/zend.h:237:0,
from /home/flav/phpmeta/meta.c:19:
/usr/include/php/Zend/zend_alloc.h:48:2: error: unknown type name ‘uint’
/usr/include/php/Zend/zend_alloc.h:50:2: error: unknown type name ‘uint’
/usr/include/php/Zend/zend_alloc.h:57:37: error: unknown type name ‘uint’
/usr/include/php/Zend/zend_alloc.h:57:55: error: unknown type name ‘uint’
/usr/include/php/Zend/zend_alloc.h:58:71: error: unknown type name ‘uint’
/usr/include/php/Zend/zend_alloc.h:58:89: error: unknown type name ‘uint’
In file included from /usr/include/php/Zend/zend.h:237:0,
from /home/flav/phpmeta/meta.c:19:
a:link {text-decoration:none;}
a:link {color:mediumspringgreen;}
a:link {background-color:maroon;}
@flavius
flavius / Makefile
Created September 6, 2011 11:26
code coverage
CC=gcc
CFLAGS=-Wall -g3 -O0 -fprofile-arcs -ftest-coverage
OBJ_FILES=main.o
primes: $(OBJ_FILES)
$(CC) $(CFLAGS) -o $@ $?
main.o: main.c
$(CC) $(CFLAGS) -o $@ -c $?
#include <stdio.h>
#include <stdlib.h>
#define NUMS 10
typedef struct _foo {
char *t;
int i;
} foo;
test