Coder Social home page Coder Social logo

Comments (5)

pasis avatar pasis commented on July 28, 2024

Good catch. The same situation with libxml2 module. I don't see any acceptable solution with current interface neither.

I wouldn't recommend to add a global state to libstrophe. Global allocator would require locking for multi-thread applications for example.

Removing argument userdata allows to pass libstorphe's allocator to expat and libxml2, but this also breaks user allocators that don't use global state.

I will think what we can do in this situation...

from libstrophe.

pasis avatar pasis commented on July 28, 2024

Since I don't see perfect solution I would recommend to remove userdata argument from the libstrophe's API. Users still can implement multi-thread allocators of any complexity and libstrophe's code remains simple and without internal locking.

I made a quick search for openssl custom allocator, but haven't found anything. Anyway playing with crypto library is not a good idea.

Are you interested in preparing the patch? Or I can implement this.

from libstrophe.

Sacryn avatar Sacryn commented on July 28, 2024

Feel free to implement/patch. I'm a bit swamped at the moment otherwise I would be happy to help out.

from libstrophe.

pasis avatar pasis commented on July 28, 2024

No problem, I'll do this at spare time.

from libstrophe.

pasis avatar pasis commented on July 28, 2024

fb327d4 fixes the issue for a single strophe context. Libxml2 module still doesn't override memory functions.

from libstrophe.

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.