Giter Club home page Giter Club logo

Comments (4)

valpackett avatar valpackett commented on June 15, 2024

Never tried Swift 4, I don't even have a working Swift compiler anywhere currently… Do you have any idea what might be happening here?

I found this: https://bugs.swift.org/browse/SR-5119 — could that be the issue?

from swiftcbor.

daijo avatar daijo commented on June 15, 2024

I think it's because the istream gets modified while we parse through the CBOR. I think if it was immutable and just iterated over there wouldn't be a problem. Not sure if there's an easy way todo this.

from swiftcbor.

daijo avatar daijo commented on June 15, 2024

I have a fix for this. You can have a look here:

daijo@c259b81

I had to make the stream immutable and pass it along in the recursion. I'm not sure it would make a good pull request since I think the memory performance might not be good enough for general use. It will probably be good enough in our application since we have an upper limit on the size of the CBOR.

In any case I need to tidy up a little.

Have a look!

from swiftcbor.

bgiori avatar bgiori commented on June 15, 2024

I just made a pull request for the same issue, you can fix the issue by moving the two popByte calls to separate lines in the code (see #9).

from swiftcbor.

Related Issues (20)

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.