dsheets / ocaml-osx-cf Goto Github PK
View Code? Open in Web Editor NEWCoreFoundation bindings in OCaml
License: ISC License
CoreFoundation bindings in OCaml
License: ISC License
I just got that funny error, I am not sure what I've did wrong.
How to reproduce:
$ git clone https://github.com/samoht/irmin-watcher.git
$ git checkout broken
$ opam install osx-fsevents
$ opam install irmin-watcher --deps
$ make test
...
Thread 3 killed on uncaught exception Lwt_stream.Closed
...
Thread 6 killed on uncaught exception Failure("CFRunLoop.Observer.Activity.of_ullong unknown code")
...
[and then the test never seem to finish, but this is maybe an issue with the test itself]
Right now, we just leak CF objects.
$ make
CTYPES_LIB_DIR=/Users/thomas/.opam/system/lib/ctypes OCAML_LIB_DIR=/usr/local/lib/ocaml ocamlbuild -use-ocamlfind -classic-display cf.cma cf.cmxa libcf_stubs.a dllcf_stubs.so cf_lwt.cma cf_lwt.cmxa
ocamlfind ocamlc -g -ccopt -I/usr/local/include -g -c lib/osx_cf_util.c
+ ocamlfind ocamlc -g -ccopt -I/usr/local/include -g -c lib/osx_cf_util.c
lib/osx_cf_util.c:11:1: error: unknown type name 'CFRunLoopRunResult'
CFRunLoopRunResult osx_cf_run_loop_run_in_mode
^
lib/osx_cf_util.c:13:21: error: expected ';' after expression
CFRunLoopRunResult r;
^
;
lib/osx_cf_util.c:13:3: error: use of undeclared identifier 'CFRunLoopRunResult'
CFRunLoopRunResult r;
^
lib/osx_cf_util.c:13:22: error: use of undeclared identifier 'r'
CFRunLoopRunResult r;
^
lib/osx_cf_util.c:15:3: error: use of undeclared identifier 'r'
r = CFRunLoopRunInMode(mode, seconds, returnAfterSourceHandled);
^
lib/osx_cf_util.c:17:10: error: use of undeclared identifier 'r'
return r;
^
6 errors generated.
Command exited with code 2.
make: *** [build] Error 10
It seems that CFRunLoopRunResult
has been added in 10.11.
Instead of using ctypes-foreign
to pass OCaml functions as callbacks, CFRunLoopObserverCallBack
could call a fixed C function that uses the user data pointer to pass an index into a table.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.