Skip to content

Releases: libyuni/libyuni

v1.1.1

10 Mar 01:49
Compare
Choose a tag to compare

(Maintenance Release)

Fixes

  • {core} Process::Program Fixed compilation on VS2015
  • {core} Env vars: Fixed invalid size on Windows when reading the content of a variable (#3)

v1.1.0

28 Jan 14:05
Compare
Choose a tag to compare

License

IMPORTANT NOTICE: libyuni is now under the MPL2 license
(Mozilla Public License, version 2.0), instead of LGPL, to remove any licensing ambiguities.

New

  • {core} {event} added fold method for callback result folding

    Event<uint ()> evt;
    evt.connect([]() -> uint { return 10u; });
    evt.connect([]() -> uint { return 4u; });
    std::cout << evt.fold(0u, Lambda::Add<uint>()) << std::endl; // 14
    
  • {core} Functional: Support for collection Views with fold, filter, map
    and many pre-defined binary operations for folding.

  • {core} String: added operator overloads for easier UTF8::Char / multi-byte
    string comparisons.

  • {core} String: now accepts wide strings

  • {core} added Yuni::WString, a lightweight helper for manipulating wide strings

  • {core} added Yuni::HashCombine (yuni/core/stl/hash-combine.h) to easily
    compute the the hash of complex structs.

  • {core} added Yuni::deleteAndNull and deleteArrayAndNull, to delete an object
    and set the underlying variable to null in one call

  • {core} added Yuni::Math::RoundUp, for rounding up to the nearest multiple of a number

  • {core} added Yuni::NonMovable

  • {core} added Yuni::System::Environment::ReadAsBool and Yuni::System::Environment::ReadAsInt64
    Those functions can be useful for performance reasons (avoids memory allocations whever it
    is possible), where the string value is not required

  • {io} added Yuni::IO::FetchFileStatus(), to retrieve in one call the type,
    the size and the timestamp of the last modifcation of a filename

  • {jobs} added Yuni::Job::Taskgroup, for easily handling groups of jobs

  • {jobs} added the method gracefulStop() to the queue service to ask
    it to stop as soon as possible. The big advantage to this method is it
    can be called from any threads, unlike stop() which may create a
    deadlock if called from a job.

  • {jobs} added the method clear() to the queue service to remove all jobs
    waiting to be executed

  • {parser} JSON export

  • {sample} {parser} added json parser

  • {core} The warning '-Wsitch' on gcc/clang (enumeration value not handled in switch) is now an error.
    For legacy programs, the default clause can be added where appropriate.

Changes

  • {core} Yuni::Process has been renamed Yuni::Process::Program.
  • {core} Yuni::Process do no longer automatically redirect the output
    of the subprocess to the standard output of the parent process.
    The method Yuni::Process::Program::redirectToConsole(bool) can be use to
    modify this behavior.
  • {core} Fold : Renamed Yuni::Functional::Fold to Yuni::fold.
  • {core} String: both the methods String::format() and String::appendFormat()
    now use const char* format instead of const AnyString& format.
    Reason: 'va_start' has undefined behavior with reference types. You
    can use String::c_str() if old code were using Yuni::String as input format.
  • {core} Jobs: The method wait of the queue service now requires an event
    to distinguish the different use-cases. Uses qseIdle to wait for all jobs
    being executed (this value should represent the old behavior of wait)
    or use qseStop to wait for the queue service being stopped (by
    stop() or gracefulStop()).
  • {core} String::words: empty elements are now kept by default, as it was stated
    in the documentation.
  • {core} Updated the list of Microsoft Security Development Lifecycle (SDL) banned APIs
  • {io} IO::NodeType has new possible values to better match UNIX characteristics:
    typeSymLink, typeSocket and typeSpecial
  • {io} IO::TypeOf() now accepts an optional parameter followSymLink
  • {jobs} Overall Performance Improvement
  • {jobs} Yuni::Job::QueueService now uses an intrusive smartptr
  • {dbi} upgraded to sqlite 3.9.1

Fixes

  • {core} Detection of the clang compiler when CMAKE_CXX_COMPILER is not used
  • [core] Fixed return value of Yuni::String::replace(char, char) which always returned 0
    (instead of the number of replaced characters as expected)

Deprecated

  • {vm} This module is now deprecated and will be removed in future releases

v1.0.2

17 Dec 01:08
Compare
Choose a tag to compare

Changes

  • {core} String: the method String::format() and String::appendFormat()
    now use const char* format instead of const AnyString& format.
    Reason: 'va_start' has undefined behavior with reference types. You
    can use String::c_str() if old code were using Yuni::String as input format.

    This patch breaks ABI compatibility for the branch 1.0.x, but since it would
    lead to undefined behavior, it has been backported from v1.1.

Fixes

  • {core} Fixed compilation with clang 3.5

v1.0.1

17 Dec 01:07
Compare
Choose a tag to compare

Changes

  • {documentation} Updated changelogs

Fixes

  • {core} String: Fixed compilation for C++ compiler without C++11 support
  • {parser} Fixes for empty/error rules
  • {core} Variant: Fixed compilation with VS2013

v1.0.0

17 Dec 01:06
Compare
Choose a tag to compare

New

  • {core} Multihreading:

    • Introduced new convenient utility routines for Multithreading Programming:
      spawn, every, async and sync (see yuni/thread/utility.h for more details)
    • Yuni::IThread is now able to set the internal thread stack size via a parameter
      from its constructor, mainly to reduce memory consumption when a lot of threads are involved.
      The default value has been set to 512K, which should be large enough for most scenarios.
  • {core} C++11/14 support enhancement:

    - `Yuni::Bind` now supports C++11 lambda
    - `Yuni::String` now supports move semantic
    - Multiple fixes related to C++11/14 standards
    
  • {core} Yuni::SmartPtr is now able to detect if an ownership policy does not seem appropriate
    (see changes about intrusive smart pointers - COMReferenceCounted policy)

  • {core} An helper class is now available to detect at compile time if a specific typedef
    is available within a given class and his ancestors (see yuni/core/static/typedef.h)

  • {core} System::Console: new routines IsStdoutTTY() and IsStderrTTY() to determine
    whether the standard output (or standard error output) is a TTY or not

  • {core} added new class Yuni::Tribool, a 3-state boolean

  • {core} added typedefs float32, float64

  • {core} Bind: added method empty() and operator ! to determine if an object is binded

  • {core/functional} added Functional::Fold() routine

  • {dbi} The DBI/sqlite adapter is now ready for production

  • {io} Yuni::IO::LoadFromFile now accepts std::string as a destination

Changes

  • {core} Smart pointers:
    • IIntrusiveSmartPtr<T> now uses a non recursive mutex.
      • Yuni::SmartPtr won't compile when using the COMReferenceCounted ownership policy
        (intrusive smart ptr, the reference counter is inside the object) if the
        underlying object does not have the required methods (addRef, release, and
        hasIntrusiveSmartPtr) The abstract class IIntrusiveSmartPtr should be used for
        implementing intrusive smart pointer.
    • The method SmartPtr::unique() has been removed due to thread-safety issues
    • IIntrusiveSmartPtr::onRelease is now const.
  • {core} Jobs:
    • Yuni::Job::IJob and Yuni::Thread::IThread now use intrusive smartptr
      to reduce memory allocation in high workload environments. Consequently it may not compile
      for some old program. Use IJob::Ptr::Promote<T>::Ptr or Thread::IThread::Ptr::Promote<T>::Ptr
      to get the appropriate smartptr type.
    • <yuni/job/queue/queue.h> has been remamed to <yuni/job/queue/service.h> for consistency
    • <yuni/job/queue.h> has been removed. Please use <yuni/job/queue/service.h> instead
    • Yuni::Job::QueueService is no longer a template class and has been
      internally revamped
  • {core} Variants:
    • The variant's types have been renamed (Yuni::Variant::tString is now Yuni::variantTString)
  • {core} Math/Geometry:
    • the methods Point2D::closeTo() have been renamed to Point2D::isCloseTo()
    • the methods Point3D::closeTo() have been renamed to Point3D::isCloseTo()
  • {core} Misc: msinttypes for Visual Studio has been updated to r29 (http://code.google.com/p/msinttypes/)
  • {core} Event::Loop: added the method gracefulStop()
  • {core} Point2D and Point3D : Added operator * and *=.
  • {core} String : added an optional boolean to words() to keep empty lines
  • {dbi} Updated sqlite to v3.8.3
  • {gl} Updated glew to v1.10

Fixes

  • {core} Fixed Clang compiler detection
  • {core} Fixed compilation on Visual Studio 2013
  • {core} Yuni::Timer: Fixed a potential race condition
  • {core} Math/Geometry : added missing operator**{}** const for Point2D, Point3D, and Vector3D.
  • {core} Fixed the method Yuni::String::split() with list or vector of AnyString,
    which was producing unpredictable results (ex: calling String("1,2,3").split(mylist, ",")
    with mylist as AnyString::Vector)
  • {core} Fixed the method IO::Directory::Info::clean(), which was only deleting subfolders
  • {core} removed overload on std::vector/std::list with std::ostream
  • {core} #462: string: fixes implicit cast to bool when assigning an int from the constructor
  • {core} Yuni::String: istartsWith was not case-insensitive
  • {core} #351, #358: System::Environment::Read now handle Unicode value on Windows
  • {core} #463: Bind: fixed invalid pointer when unbinding (VS2013)
  • {io} Fixed directory and file iterators when given a path containing mixed slashes and backslashes.