GithubHelp home page GithubHelp logo

lbuffer's People

Contributors

brimworks avatar starwing avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

lbuffer's Issues

Does not work properly under lua5.3

Hi,

I've successfully compiled and deployed lbuffer, but it does not work as expected under lua 5.3. it seems like 'append' and 'assign' are somehow missing:

$ lua5.3 -lbuffer
Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio

b = buffer "abc"
=b:set(2, "pple")
apple
=b:append "pie"
stdin:1: attempt to call a nil value (method 'append')
stack traceback:
stdin:1: in main chunk
[C]: in ?
=b:insert(-3, '-')
ap-ple
=b:assign "abc"
stdin:1: attempt to call a nil value (method 'assign')
stack traceback:
stdin:1: in main chunk
[C]: in ?

please advise

Heads up : new fork for Haxe-specific support

Hello,

I maintain Haxe support for the Lua target. I had wanted to use a Lua library for faster buffer manipulation. However, this proved difficult as I needed 0-based index support. I haven't had luck committing changes to support this into other relevant libraries, so I've gone ahead and forked your lbuffer lib and manually changed the index scheme. FWIW, this isn't a library that should be used by Lua developers, it's only meant to be used by the Haxe compiler.

I've given support and provided a link to your library here. Thanks for your work, it's much appreciated!

https://github.com/jdonaldson/hxlbuffer

Does it work with Lua 5.4?

Hi! Your code looks quite useful and nice, but it gives funny warnings when compiled with Lua 5.4:

lbuffer.c: In function ‘write_int32’:
lbuffer.c:261:26: warning: this statement may fall through [-Wimplicit-fallthrough=]
  261 |             case 4: *s++ = (n >> 24) & 0xFF;
      |                     ~~~~~^~~~~~~~~~~~~~~~~~

(and similar repeat over again). Are fallthroughs intended?

Also, it requires LUA_QS and LUA_QL, absent in 5.4. I've copied them from Lua 5.2 and it kinda works, but I ask in case an update or some reworking is needed. Thank you in advance.

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.