int main() { printf("main: Hello, world!\n"); int *x = &z; *x = 3; printf("main: 1, x is %d\n", *x); foo_read(x); printf("main: 2, x is %d\n", *x); foo_write(x); // bad printf("main: 3, x is %d\n", *x); return 0; }
static void process_queue (PnHttpServer *http_conn, GError **error) { HttpQueueData *queue_data; queue_data = g_queue_pop_head (http_conn->write_queue); if (queue_data) { foo_write (PN_NODE (http_conn), queue_data->conn, queue_data->body, queue_data->body_len, NULL, error); g_object_unref (queue_data->conn); g_free (queue_data->body); g_free (queue_data); } }