Results 1 to 5 of 5

Thread: Global CL_Exception catch optimizations and more (ClanLib 2.2)

  1. #1
    Lesser Knight
    Join Date
    Jan 2011
    Posts
    32

    Default Global CL_Exception catch optimizations and more (ClanLib 2.2)

    1. A lot of catches of CL_Exception by value were changed to catches by constant references.
    2. Optimized some exception re-throws.
    3. Fixed CL_FileHelp::copy_file (linux version).

    By the way, I've already offered a patch with (1) and (2) changes, but rombust said this:
    For ClanLib 2.2 SVN, I did not apply the CL_Exception modifications due to it breaking library binary compatibility when dynamically linking on linux.
    How can some internal library catch fixes influence on compatibility? API is not changed...
    Attached Files Attached Files
    Last edited by user; 07-22-2011 at 06:43 AM.

  2. #2
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,769

    Default

    Quote Originally Posted by user View Post
    How can some internal library catch fixes influence on compatibility? API is not changed...
    Because I did not read your patch properly. Sorry

  3. #3
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,769

    Default

    Patch applied to ClanLib 2.2. SVN.

    The CL_FileHelp::copy_file() bug is nasty, it took me a while to see what was wrong with it. (throwing CL_Exception inside a "try" block)

    I changed "while (!copy_always)" back to "if (!copy_always)"
    (since it is not a loop)

    CL_FileHelp::copy_file() patch applied to ClanLib 2.3 SVN (The exception patch was already applied)

    Many thanks

  4. #4
    Lesser Knight
    Join Date
    Jan 2011
    Posts
    32

    Default

    I changed "while (!copy_always)" back to "if (!copy_always)"
    (since it is not a loop)
    What about "break" inside this loop, do you see it?
    I made it "while" to break it lately either using break or throw. Just not to do any "goto".
    With "if" instead of "while" it will not compile.

  5. #5
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,769

    Default

    lmao, I am stupid!

    (fixed in SVN)

Similar Threads

  1. CL_Exception::what() returns invalid pointer if UNICODE is #defined
    By Deewiant in forum ClanLib: Developer Chat
    Replies: 2
    Last Post: 10-20-2009, 10:08 AM
  2. Global variables resetting themselves?
    By Pleng in forum Novashell Game Creation System
    Replies: 4
    Last Post: 10-13-2009, 01:50 PM
  3. Global Game Jam
    By sphair in forum ClanLib: General Discussion
    Replies: 0
    Last Post: 01-03-2009, 02:29 PM
  4. Accessing the global application instance
    By Iori Branford in forum ClanLib: Help
    Replies: 2
    Last Post: 01-05-2007, 07:01 AM
  5. BP and catch up ???
    By in forum Funeral Quest
    Replies: 1
    Last Post: 10-19-2002, 12:34 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •