void on_change(uv_fs_event_t* handle, const char* filename, int events, int status) { char path[1024]; size_t size = 1023; // Does not handle error if path is longer than 1023. uv_fs_event_getpath(handle, path, &size); path[++size] = '\0'; goCallback(handle->data, path, filename, events); }
void callback(void *f) { // use some stack space volatile char data[64*1024]; data[0] = 0; goCallback(f); data[sizeof(data)-1] = 0; }
void sofunc(void) { goCallback(); }