Coder Social home page Coder Social logo

ocaml-osx-cf's Introduction

OCaml bindings to OS X CoreFoundation

These bindings use ctypes for type-safe stub generation.

Dependent Packages

ocaml-osx-cf's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ocaml-osx-cf's Issues

Does not compile on 10.10

$ 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.

Thread 6 killed on uncaught exception Failure("CFRunLoop.Observer.Activity.of_ullong unknown code")

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]

Remove dependency on ctypes-foreign

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.