Code Monkey home page Code Monkey logo

cl-libyaml's People

Contributors

eudoxia0 avatar fiddlerwoaroof avatar jasonmelbye avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cl-libyaml's Issues

With- macros don't release memory

The two convenience macros, with-parser and with-event don't free up the allocated memory. The forms end with calls to a libyaml delete functions, but those functions don't free the memory for the top-level data structure. Rather, they free up memory for its slots and zero out all the bytes.

The body of the with- forms could either end with a call to foreign-free, or alternatively, expand into a with-foreign-object call rather than calling foreign-alloc.

Foreign library call (INITIALIZE) fails on Windows

Trying (cl-yaml:parse "{ a: 1, b: 2}") on Windows fails with the call to INITIALIZE in cl-libyaml.

libyaml.dll is installed from MINGW64 in "c:\msys64\mingw64\bin" (in PATH) (NB. MINGW64 library is called libyaml-0-2.dll, as on *nix systems, I've just copied it to libyaml.dll)

Lisp: SBCL 1.3.6 (installed from roswell)

Unknown CFFI type :struct

I tried to install this library via quicklisp on SBCL 1.0.55 and Ubuntu 12.04, but unfortunately it fails with the following error:

 caught ERROR:
    during compiler-macroexpansion of
    (FOREIGN-SLOT-VALUE MARK '(:STRUCT MARK-T) ...). Use *BREAK-ON-SIGNALS* to
    intercept:

     Unknown CFFI type: :STRUCT

Is there anything I can do to get it to compile on this version of SBCL? Sadly I am forced to use this old version...

Bug with multibyte characters

Hi,

using cl-yaml (cl-yaml-20150505-git, cl-libyaml-20150407-git, sbcl 1.2.16.135, UTF-8 default encoding), evaluating
(yaml:parse "€")
throws an error:
Parsing error at line 0, column 0: incomplete UTF-8 octet sequence.

Evaluating
(yaml:parse "€1234")
returns
"€12"

Maybe in cl-libyaml/src/macros.lisp in (defmacro with-parser ...) the call to with-foreign-string passes the wrong length? Should that be something like the below instead (warning: untested, and my first contact with cffi):

(with-foreign-string ((c-string octet-size) string)
  […]
  (libyaml.parser:set-input-string ,parser
                                   c-string
                                   octet-size)
  […]
  )

Thanks,

Lutz Euler

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.